controlproxy

package
v0.15.0-beta Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

http://www.apache.org/licenses/LICENSE-2.0.txt

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var (
	MAX_CONNECTION_TIMEOUT = 10 * time.Second
)

Functions

func GetPubProcReq

func GetPubProcReq(contentType string, content []byte, pluginName string, pluginVersion int, config map[string]ctypes.ConfigValue, taskID string) *rpc.PubProcMetricsRequest

Constructs a protobuf message for publish/process given the relevant information

Types

type ControlProxy

type ControlProxy struct {
	Client rpc.MetricManagerClient
}

Implements managesMetrics interface provided by scheduler and proxies those calls to the grpc client.

func New

func New(addr string, port int) (ControlProxy, error)

func (ControlProxy) CollectMetrics

func (c ControlProxy) CollectMetrics(mts []core.Metric, deadline time.Time, taskID string, AllTags map[string]map[string]string) ([]core.Metric, []error)

func (ControlProxy) ExpandWildcards

func (c ControlProxy) ExpandWildcards(namespace core.Namespace) ([]core.Namespace, serror.SnapError)

func (ControlProxy) GetAutodiscoverPaths

func (c ControlProxy) GetAutodiscoverPaths() []string

func (ControlProxy) GetPluginContentTypes

func (c ControlProxy) GetPluginContentTypes(n string, t core.PluginType, v int) ([]string, []string, error)

func (ControlProxy) MatchQueryToNamespaces

func (c ControlProxy) MatchQueryToNamespaces(namespace core.Namespace) ([]core.Namespace, serror.SnapError)

func (ControlProxy) ProcessMetrics

func (c ControlProxy) ProcessMetrics(contentType string, content []byte, pluginName string, pluginVersion int, config map[string]ctypes.ConfigValue, taskID string) (string, []byte, []error)

func (ControlProxy) PublishMetrics

func (c ControlProxy) PublishMetrics(contentType string, content []byte, pluginName string, pluginVersion int, config map[string]ctypes.ConfigValue, taskID string) []error

func (ControlProxy) SubscribeDeps

func (c ControlProxy) SubscribeDeps(taskID string, mts []core.Metric, plugins []core.Plugin) []serror.SnapError

func (ControlProxy) UnsubscribeDeps

func (c ControlProxy) UnsubscribeDeps(taskID string, mts []core.Metric, plugins []core.Plugin) []serror.SnapError

func (ControlProxy) ValidateDeps

func (c ControlProxy) ValidateDeps(mts []core.Metric, plugins []core.SubscribedPlugin) []serror.SnapError

Directories

Path Synopsis
Package rpc is a generated protocol buffer package.
Package rpc is a generated protocol buffer package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL