示例#1
0
func CreateGCMScalingSink(uri *url.URL) ([]sink_api.ExternalSink, error) {
	if *uri != (url.URL{}) {
		return nil, fmt.Errorf("gcmautoscaling sinks don't take arguments")
	}
	core, err := gcm.NewCore()
	sink := gcmAutocalingSink{core: core}
	glog.Infof("created GCM Autocaling sink")
	return []sink_api.ExternalSink{sink}, err
}
示例#2
0
func CreateGCMAutoscalingSink(uri *url.URL, conf extpoints.HeapsterConf) ([]sink_api.ExternalSink, error) {
	if *uri != (url.URL{}) {
		return nil, fmt.Errorf("gcmautoscaling sinks don't take arguments")
	}
	core, err := gcm.NewCore()
	sink := gcmAutocalingSink{
		core:       core,
		resolution: conf.StatsResolution,
	}
	glog.Infof("created GCM Autocaling sink")
	return []sink_api.ExternalSink{sink}, err
}