Documentation
¶
Index ¶
- Variables
- type CallsRPC
- type PluginCacheClient
- type PluginClient
- type PluginCollectorClient
- 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.PluginConfigType) ([]core.Metric, error)
- func (p *PluginNativeClient) GetType() string
- func (p *PluginNativeClient) Kill(reason string) error
- func (p *PluginNativeClient) Ping() error
- func (p *PluginNativeClient) Process(contentType string, content []byte, config map[string]ctypes.ConfigValue) (string, []byte, error)
- func (p *PluginNativeClient) Publish(contentType string, content []byte, config map[string]ctypes.ConfigValue) error
- func (p *PluginNativeClient) SetKey() error
- type PluginProcessorClient
- type PluginPublisherClient
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrCacheEntryDoesNotExist = errors.New("cache entry does not exist")
)
View Source
var GlobalCacheExpiration time.Duration
the time limit for which a cache entry is valid.
Functions ¶
This section is empty.
Types ¶
type PluginCacheClient ¶
type PluginClient ¶
type PluginClient interface {
PluginCacheClient
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
type PluginNativeClient ¶
type PluginNativeClient struct {
PluginCacheClient
// 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.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.
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.
Click to show internal directories.
Click to hide internal directories.