client

package
v0.8.0-beta Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2015 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalCacheExpiration time.Duration

the time limit for which a cache entry is valid.

Functions

This section is empty.

Types

type CallsRPC

type CallsRPC interface {
	Call(methd string, args interface{}, reply interface{}) error
}

CallsRPC provides an interface for RPC clients

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.PluginConfigType) ([]core.Metric, error)
}

PluginCollectorClient A client providing collector specific plugin method calls.

func NewCollectorHttpJSONRPCClient

func NewCollectorHttpJSONRPCClient(u string, timeout time.Duration, pub *rsa.PublicKey, secure bool) (PluginCollectorClient, error)

NewCollectorHttpJSONRPCClient returns CollectorHttpJSONRPCClient

func NewCollectorNativeClient

func NewCollectorNativeClient(address string, timeout time.Duration, pub *rsa.PublicKey, secure bool) (PluginCollectorClient, error)

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 (p *PluginNativeClient) CollectMetrics(coreMetricTypes []core.Metric) ([]core.Metric, error)

func (*PluginNativeClient) GetConfigPolicy

func (p *PluginNativeClient) GetConfigPolicy() (*cpolicy.ConfigPolicy, error)

func (*PluginNativeClient) GetMetricTypes

func (p *PluginNativeClient) GetMetricTypes(config plugin.PluginConfigType) ([]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(contentType string, content []byte, config map[string]ctypes.ConfigValue) (string, []byte, error)

func (*PluginNativeClient) Publish

func (p *PluginNativeClient) Publish(contentType string, content []byte, config map[string]ctypes.ConfigValue) error

func (*PluginNativeClient) SetKey

func (p *PluginNativeClient) SetKey() error

type PluginProcessorClient

type PluginProcessorClient interface {
	PluginClient
	Process(contentType string, content []byte, config map[string]ctypes.ConfigValue) (string, []byte, error)
}

PluginProcessorClient A client providing processor specific plugin method calls.

func NewProcessorHttpJSONRPCClient

func NewProcessorHttpJSONRPCClient(u string, timeout time.Duration, pub *rsa.PublicKey, secure bool) (PluginProcessorClient, error)

func NewProcessorNativeClient

func NewProcessorNativeClient(address string, timeout time.Duration, pub *rsa.PublicKey, secure bool) (PluginProcessorClient, error)

type PluginPublisherClient

type PluginPublisherClient interface {
	PluginClient
	Publish(contentType string, content []byte, config map[string]ctypes.ConfigValue) error
}

PluginPublisherClient A client providing publishing specific plugin method calls.

func NewPublisherHttpJSONRPCClient

func NewPublisherHttpJSONRPCClient(u string, timeout time.Duration, pub *rsa.PublicKey, secure bool) (PluginPublisherClient, error)

func NewPublisherNativeClient

func NewPublisherNativeClient(address string, timeout time.Duration, pub *rsa.PublicKey, secure bool) (PluginPublisherClient, error)

Jump to

Keyboard shortcuts

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