Documentation ¶
Index ¶
- func ConfigMapToConfig(cfg *rpc.ConfigMap) *cdata.ConfigDataNode
- func ConfigToConfigMap(cd *cdata.ConfigDataNode) *rpc.ConfigMap
- func NewMetrics(ms []core.Metric) []*rpc.Metric
- func ParseConfig(config *rpc.ConfigMap) map[string]ctypes.ConfigValue
- func ToConfigMap(cv map[string]ctypes.ConfigValue) *rpc.ConfigMap
- func ToCoreMetric(mt *rpc.Metric) core.Metric
- func ToCoreMetrics(mts []*rpc.Metric) []core.Metric
- func ToCoreNamespace(n []*rpc.NamespaceElement) core.Namespace
- func ToMetric(co core.Metric) *rpc.Metric
- func ToNamespace(n core.Namespace) []*rpc.NamespaceElement
- func ToTime(t time.Time) *rpc.Time
- type CallsRPC
- type PluginClient
- type PluginCollectorClient
- func NewCollectorGrpcClient(address string, timeout time.Duration, pub *rsa.PublicKey, secure bool) (PluginCollectorClient, error)
- func NewCollectorHttpJSONRPCClient(u string, timeout time.Duration, pub *rsa.PublicKey, secure bool) (PluginCollectorClient, error)
- func NewCollectorNativeClient(address string, timeout time.Duration, pub *rsa.PublicKey, secure bool) (PluginCollectorClient, error)
- type PluginNativeClient
- func (p *PluginNativeClient) CollectMetrics(mts []core.Metric) ([]core.Metric, error)
- func (p *PluginNativeClient) GetConfigPolicy() (*cpolicy.ConfigPolicy, error)
- func (p *PluginNativeClient) GetMetricTypes(config plugin.ConfigType) ([]core.Metric, error)
- func (p *PluginNativeClient) GetType() string
- func (p *PluginNativeClient) Kill(reason string) error
- func (p *PluginNativeClient) Ping() error
- func (p *PluginNativeClient) Process(metrics []core.Metric, config map[string]ctypes.ConfigValue) ([]core.Metric, error)
- func (p *PluginNativeClient) Publish(metrics []core.Metric, config map[string]ctypes.ConfigValue) error
- func (p *PluginNativeClient) SetKey() error
- type PluginProcessorClient
- func NewProcessorGrpcClient(address string, timeout time.Duration, pub *rsa.PublicKey, secure bool) (PluginProcessorClient, error)
- func NewProcessorHttpJSONRPCClient(u string, timeout time.Duration, pub *rsa.PublicKey, secure bool) (PluginProcessorClient, error)
- func NewProcessorNativeClient(address string, timeout time.Duration, pub *rsa.PublicKey, secure bool) (PluginProcessorClient, error)
- type PluginPublisherClient
- func NewPublisherGrpcClient(address string, timeout time.Duration, pub *rsa.PublicKey, secure bool) (PluginPublisherClient, error)
- func NewPublisherHttpJSONRPCClient(u string, timeout time.Duration, pub *rsa.PublicKey, secure bool) (PluginPublisherClient, error)
- func NewPublisherNativeClient(address string, timeout time.Duration, pub *rsa.PublicKey, secure bool) (PluginPublisherClient, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigMapToConfig ¶
func ConfigMapToConfig(cfg *rpc.ConfigMap) *cdata.ConfigDataNode
func ConfigToConfigMap ¶
func ConfigToConfigMap(cd *cdata.ConfigDataNode) *rpc.ConfigMap
func ParseConfig ¶
func ParseConfig(config *rpc.ConfigMap) map[string]ctypes.ConfigValue
func ToConfigMap ¶
func ToConfigMap(cv map[string]ctypes.ConfigValue) *rpc.ConfigMap
func ToCoreNamespace ¶
func ToCoreNamespace(n []*rpc.NamespaceElement) core.Namespace
func ToNamespace ¶
func ToNamespace(n core.Namespace) []*rpc.NamespaceElement
Types ¶
type PluginClient ¶
type PluginClient interface { SetKey() error Ping() error Kill(string) error GetConfigPolicy() (*cpolicy.ConfigPolicy, error) }
PluginClient A client providing common plugin method calls.
type PluginCollectorClient ¶
type PluginCollectorClient interface { PluginClient CollectMetrics([]core.Metric) ([]core.Metric, error) GetMetricTypes(plugin.ConfigType) ([]core.Metric, error) }
PluginCollectorClient A client providing collector specific plugin method calls.
func NewCollectorGrpcClient ¶
func NewCollectorGrpcClient(address string, timeout time.Duration, pub *rsa.PublicKey, secure bool) (PluginCollectorClient, error)
NewCollectorGrpcClient returns a collector gRPC Client.
func NewCollectorHttpJSONRPCClient ¶
func NewCollectorHttpJSONRPCClient(u string, timeout time.Duration, pub *rsa.PublicKey, secure bool) (PluginCollectorClient, error)
NewCollectorHttpJSONRPCClient returns CollectorHttpJSONRPCClient
type PluginNativeClient ¶
type PluginNativeClient struct {
// contains filtered or unexported fields
}
Native clients use golang net/rpc for communication to a native rpc server.
func (*PluginNativeClient) CollectMetrics ¶
func (*PluginNativeClient) GetConfigPolicy ¶
func (p *PluginNativeClient) GetConfigPolicy() (*cpolicy.ConfigPolicy, error)
func (*PluginNativeClient) GetMetricTypes ¶
func (p *PluginNativeClient) GetMetricTypes(config plugin.ConfigType) ([]core.Metric, error)
func (*PluginNativeClient) GetType ¶
func (p *PluginNativeClient) GetType() string
GetType returns the string type of the plugin Note: the first letter of the type will be capitalized.
func (*PluginNativeClient) Kill ¶
func (p *PluginNativeClient) Kill(reason string) error
func (*PluginNativeClient) Ping ¶
func (p *PluginNativeClient) Ping() error
func (*PluginNativeClient) Process ¶
func (p *PluginNativeClient) Process(metrics []core.Metric, config map[string]ctypes.ConfigValue) ([]core.Metric, error)
func (*PluginNativeClient) Publish ¶
func (p *PluginNativeClient) Publish(metrics []core.Metric, config map[string]ctypes.ConfigValue) error
func (*PluginNativeClient) SetKey ¶
func (p *PluginNativeClient) SetKey() error
type PluginProcessorClient ¶
type PluginProcessorClient interface { PluginClient Process([]core.Metric, map[string]ctypes.ConfigValue) ([]core.Metric, error) }
PluginProcessorClient A client providing processor specific plugin method calls.
func NewProcessorGrpcClient ¶
func NewProcessorGrpcClient(address string, timeout time.Duration, pub *rsa.PublicKey, secure bool) (PluginProcessorClient, error)
NewProcessorGrpcClient returns a processor gRPC Client.
type PluginPublisherClient ¶
type PluginPublisherClient interface { PluginClient Publish([]core.Metric, map[string]ctypes.ConfigValue) error }
PluginPublisherClient A client providing publishing specific plugin method calls.
func NewPublisherGrpcClient ¶
func NewPublisherGrpcClient(address string, timeout time.Duration, pub *rsa.PublicKey, secure bool) (PluginPublisherClient, error)
NewPublisherGrpcClient returns a publisher gRPC Client.