apm

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: MPL-2.0 Imports: 4 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APM

type APM interface {
	Query(q string, r sdk.TimeRange) (sdk.TimestampedMetrics, error)
	QueryMultiple(q string, r sdk.TimeRange) ([]sdk.TimestampedMetrics, error)
	PluginInfo() (*base.PluginInfo, error)
	SetConfig(config map[string]string) error
}

type Plugin

type Plugin struct {
	Impl APM
}

Plugin is the plugin.Plugin

func (Plugin) Client

func (Plugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)

func (*Plugin) Server

func (p *Plugin) Server(*plugin.MuxBroker) (interface{}, error)

type QueryRPCReq added in v0.2.0

type QueryRPCReq struct {
	Query string
	Range sdk.TimeRange
}

type RPC

type RPC struct {
	// contains filtered or unexported fields
}

RPC is a plugin implementation that talks over net/rpc

func (*RPC) PluginInfo

func (r *RPC) PluginInfo() (*base.PluginInfo, error)

func (*RPC) Query

func (r *RPC) Query(q string, rng sdk.TimeRange) (sdk.TimestampedMetrics, error)

func (*RPC) SetConfig

func (r *RPC) SetConfig(config map[string]string) error

type RPCServer

type RPCServer struct {
	Impl APM
}

RPCServer is the net/rpc server

func (*RPCServer) PluginInfo

func (s *RPCServer) PluginInfo(_ interface{}, r *base.PluginInfo) error

func (*RPCServer) Query

func (s *RPCServer) Query(req QueryRPCReq, resp *sdk.TimestampedMetrics) error

func (*RPCServer) SetConfig

func (s *RPCServer) SetConfig(config map[string]string, resp *error) error

Jump to

Keyboard shortcuts

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