Documentation ¶
Overview ¶
Package agent is a generated protocol buffer package.
It is generated from these files:
udf.proto
It has these top-level messages:
InfoRequest InfoResponse OptionInfo InitRequest Option OptionValue InitResponse SnapshotRequest SnapshotResponse RestoreRequest RestoreResponse KeepaliveRequest KeepaliveResponse ErrorResponse BeginBatch Point EndBatch Request Response
Index ¶
- Variables
- func ReadMessage(buf *[]byte, r ByteReadReader, msg proto.Message) error
- func WriteMessage(msg proto.Message, w io.Writer) error
- type Accepter
- type Agent
- type BeginBatch
- type ByteReadReader
- type EdgeType
- type EndBatch
- type ErrorResponse
- type Handler
- type InfoRequest
- type InfoResponse
- type InitRequest
- type InitResponse
- type KeepaliveRequest
- type KeepaliveResponse
- type Option
- type OptionInfo
- type OptionValue
- func (*OptionValue) Descriptor() ([]byte, []int)
- func (m *OptionValue) GetBoolValue() bool
- func (m *OptionValue) GetDoubleValue() float64
- func (m *OptionValue) GetDurationValue() int64
- func (m *OptionValue) GetIntValue() int64
- func (m *OptionValue) GetStringValue() string
- func (m *OptionValue) GetValue() isOptionValue_Value
- func (*OptionValue) ProtoMessage()
- func (m *OptionValue) Reset()
- func (m *OptionValue) String() string
- func (*OptionValue) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type OptionValue_BoolValue
- type OptionValue_DoubleValue
- type OptionValue_DurationValue
- type OptionValue_IntValue
- type OptionValue_StringValue
- type Point
- func (*Point) Descriptor() ([]byte, []int)
- func (m *Point) GetFieldsBool() map[string]bool
- func (m *Point) GetFieldsDouble() map[string]float64
- func (m *Point) GetFieldsInt() map[string]int64
- func (m *Point) GetFieldsString() map[string]string
- func (m *Point) GetTags() map[string]string
- func (*Point) ProtoMessage()
- func (m *Point) Reset()
- func (m *Point) String() string
- type Request
- func (*Request) Descriptor() ([]byte, []int)
- func (m *Request) GetBegin() *BeginBatch
- func (m *Request) GetEnd() *EndBatch
- func (m *Request) GetInfo() *InfoRequest
- func (m *Request) GetInit() *InitRequest
- func (m *Request) GetKeepalive() *KeepaliveRequest
- func (m *Request) GetMessage() isRequest_Message
- func (m *Request) GetPoint() *Point
- func (m *Request) GetRestore() *RestoreRequest
- func (m *Request) GetSnapshot() *SnapshotRequest
- func (*Request) ProtoMessage()
- func (m *Request) Reset()
- func (m *Request) String() string
- func (*Request) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type Request_Begin
- type Request_End
- type Request_Info
- type Request_Init
- type Request_Keepalive
- type Request_Point
- type Request_Restore
- type Request_Snapshot
- type Response
- func (*Response) Descriptor() ([]byte, []int)
- func (m *Response) GetBegin() *BeginBatch
- func (m *Response) GetEnd() *EndBatch
- func (m *Response) GetError() *ErrorResponse
- func (m *Response) GetInfo() *InfoResponse
- func (m *Response) GetInit() *InitResponse
- func (m *Response) GetKeepalive() *KeepaliveResponse
- func (m *Response) GetMessage() isResponse_Message
- func (m *Response) GetPoint() *Point
- func (m *Response) GetRestore() *RestoreResponse
- func (m *Response) GetSnapshot() *SnapshotResponse
- func (*Response) ProtoMessage()
- func (m *Response) Reset()
- func (m *Response) String() string
- func (*Response) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type Response_Begin
- type Response_End
- type Response_Error
- type Response_Info
- type Response_Init
- type Response_Keepalive
- type Response_Point
- type Response_Restore
- type Response_Snapshot
- type RestoreRequest
- type RestoreResponse
- type Server
- type SnapshotRequest
- type SnapshotResponse
- type ValueType
Constants ¶
This section is empty.
Variables ¶
var EdgeType_name = map[int32]string{
0: "STREAM",
1: "BATCH",
}
var EdgeType_value = map[string]int32{
"STREAM": 0,
"BATCH": 1,
}
var ValueType_name = map[int32]string{
0: "BOOL",
1: "INT",
2: "DOUBLE",
3: "STRING",
4: "DURATION",
}
var ValueType_value = map[string]int32{
"BOOL": 0,
"INT": 1,
"DOUBLE": 2,
"STRING": 3,
"DURATION": 4,
}
Functions ¶
func ReadMessage ¶ added in v1.3.0
func ReadMessage(buf *[]byte, r ByteReadReader, msg proto.Message) error
Read a message from io.ByteReader by first reading a varint size, and then reading and decoding the message object. If buf is not big enough a new buffer will be allocated to replace buf.
Types ¶
type Agent ¶
type Agent struct { // A channel for writing Responses, specifically Batch and Point responses. Responses chan<- *Response // The handler for requests. Handler Handler // contains filtered or unexported fields }
Go implementation of a Kapacitor UDF agent. This agent is responsible for reading and writing messages over a socket.
The Agent requires a Handler object in order to fulfill requests.
func New ¶
func New(in io.ReadCloser, out io.WriteCloser) *Agent
Create a new Agent is the provided in/out objects. To create an Agent that reads from STDIN/STDOUT of the process use New(os.Stdin, os.Stdout)
type BeginBatch ¶ added in v1.3.0
type BeginBatch struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Group string `protobuf:"bytes,2,opt,name=group" json:"group,omitempty"` Tags map[string]string `` /* 128-byte string literal not displayed */ Size int64 `protobuf:"varint,4,opt,name=size" json:"size,omitempty"` ByName bool `protobuf:"varint,5,opt,name=byName" json:"byName,omitempty"` }
Indicates the beginning of a batch. All subsequent points should be considered part of the batch until EndBatch arrives. This includes grouping. Batches of differing groups may not be interleaved.
All the meta data but tmax is provided, since tmax may not be known at the beginning of a batch.
Size is the number of points in the batch. If size is 0 then the batch has an undetermined size.
func (*BeginBatch) Descriptor ¶ added in v1.3.0
func (*BeginBatch) Descriptor() ([]byte, []int)
func (*BeginBatch) GetTags ¶ added in v1.3.0
func (m *BeginBatch) GetTags() map[string]string
func (*BeginBatch) ProtoMessage ¶ added in v1.3.0
func (*BeginBatch) ProtoMessage()
func (*BeginBatch) Reset ¶ added in v1.3.0
func (m *BeginBatch) Reset()
func (*BeginBatch) String ¶ added in v1.3.0
func (m *BeginBatch) String() string
type ByteReadReader ¶ added in v1.3.0
type ByteReadReader interface { io.Reader io.ByteReader }
Interface for reading messages If you have an io.Reader wrap your reader in a bufio Reader to stasify this interface.
Example: brr := bufio.NewReader(reader)
type EdgeType ¶ added in v1.3.0
type EdgeType int32
func (EdgeType) EnumDescriptor ¶ added in v1.3.0
type EndBatch ¶ added in v1.3.0
type EndBatch struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Group string `protobuf:"bytes,2,opt,name=group" json:"group,omitempty"` Tmax int64 `protobuf:"varint,3,opt,name=tmax" json:"tmax,omitempty"` Tags map[string]string `` /* 128-byte string literal not displayed */ ByName bool `protobuf:"varint,5,opt,name=byName" json:"byName,omitempty"` }
Indicates the end of a batch and contains all meta data associated with the batch. The same meta information is provided for ease of use with the addition of tmax since it may not be know at BeginBatch.
func (*EndBatch) Descriptor ¶ added in v1.3.0
func (*EndBatch) ProtoMessage ¶ added in v1.3.0
func (*EndBatch) ProtoMessage()
type ErrorResponse ¶ added in v1.3.0
type ErrorResponse struct {
Error string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
}
Sent from the process to Kapacitor indicating an error has occurred. If an ErrorResponse is received, Kapacitor will terminate the process.
func (*ErrorResponse) Descriptor ¶ added in v1.3.0
func (*ErrorResponse) Descriptor() ([]byte, []int)
func (*ErrorResponse) ProtoMessage ¶ added in v1.3.0
func (*ErrorResponse) ProtoMessage()
func (*ErrorResponse) Reset ¶ added in v1.3.0
func (m *ErrorResponse) Reset()
func (*ErrorResponse) String ¶ added in v1.3.0
func (m *ErrorResponse) String() string
type Handler ¶
type Handler interface { // Return the InfoResponse. Describing the properties of this Handler Info() (*InfoResponse, error) // Initialize the Handler with the provided options. Init(*InitRequest) (*InitResponse, error) // Create a snapshot of the running state of the handler. Snapshot() (*SnapshotResponse, error) // Restore a previous snapshot. Restore(*RestoreRequest) (*RestoreResponse, error) // A batch has begun. BeginBatch(*BeginBatch) error // A point has arrived. Point(*Point) error // The batch is complete. EndBatch(*EndBatch) error // Gracefully stop the Handler. // No other methods will be called. Stop() }
The Agent calls the appropriate methods on the Handler as it receives requests over a socket.
Returning an error from any method will cause the Agent to stop and an ErrorResponse to be sent. Some *Response objects (like SnapshotResponse) allow for returning their own error within the object itself. These types of errors will not stop the Agent and Kapacitor will deal with them appropriately.
The Handler is called from a single goroutine, meaning methods will not be called concurrently.
To write Points/Batches back to the Agent/Kapacitor use the Agent.Responses channel.
type InfoRequest ¶ added in v1.3.0
type InfoRequest struct { }
Request that the process return information about available Options.
func (*InfoRequest) Descriptor ¶ added in v1.3.0
func (*InfoRequest) Descriptor() ([]byte, []int)
func (*InfoRequest) ProtoMessage ¶ added in v1.3.0
func (*InfoRequest) ProtoMessage()
func (*InfoRequest) Reset ¶ added in v1.3.0
func (m *InfoRequest) Reset()
func (*InfoRequest) String ¶ added in v1.3.0
func (m *InfoRequest) String() string
type InfoResponse ¶ added in v1.3.0
type InfoResponse struct { Wants EdgeType `protobuf:"varint,1,opt,name=wants,enum=agent.EdgeType" json:"wants,omitempty"` Provides EdgeType `protobuf:"varint,2,opt,name=provides,enum=agent.EdgeType" json:"provides,omitempty"` Options map[string]*OptionInfo `` /* 134-byte string literal not displayed */ }
func (*InfoResponse) Descriptor ¶ added in v1.3.0
func (*InfoResponse) Descriptor() ([]byte, []int)
func (*InfoResponse) GetOptions ¶ added in v1.3.0
func (m *InfoResponse) GetOptions() map[string]*OptionInfo
func (*InfoResponse) ProtoMessage ¶ added in v1.3.0
func (*InfoResponse) ProtoMessage()
func (*InfoResponse) Reset ¶ added in v1.3.0
func (m *InfoResponse) Reset()
func (*InfoResponse) String ¶ added in v1.3.0
func (m *InfoResponse) String() string
type InitRequest ¶ added in v1.3.0
type InitRequest struct { Options []*Option `protobuf:"bytes,1,rep,name=options" json:"options,omitempty"` TaskID string `protobuf:"bytes,2,opt,name=taskID" json:"taskID,omitempty"` NodeID string `protobuf:"bytes,3,opt,name=nodeID" json:"nodeID,omitempty"` }
Request that the process initialize itself with the provided options.
func (*InitRequest) Descriptor ¶ added in v1.3.0
func (*InitRequest) Descriptor() ([]byte, []int)
func (*InitRequest) GetOptions ¶ added in v1.3.0
func (m *InitRequest) GetOptions() []*Option
func (*InitRequest) ProtoMessage ¶ added in v1.3.0
func (*InitRequest) ProtoMessage()
func (*InitRequest) Reset ¶ added in v1.3.0
func (m *InitRequest) Reset()
func (*InitRequest) String ¶ added in v1.3.0
func (m *InitRequest) String() string
type InitResponse ¶ added in v1.3.0
type InitResponse struct { Success bool `protobuf:"varint,1,opt,name=success" json:"success,omitempty"` Error string `protobuf:"bytes,2,opt,name=error" json:"error,omitempty"` }
Respond to Kapacitor whether initialization was successful.
func (*InitResponse) Descriptor ¶ added in v1.3.0
func (*InitResponse) Descriptor() ([]byte, []int)
func (*InitResponse) ProtoMessage ¶ added in v1.3.0
func (*InitResponse) ProtoMessage()
func (*InitResponse) Reset ¶ added in v1.3.0
func (m *InitResponse) Reset()
func (*InitResponse) String ¶ added in v1.3.0
func (m *InitResponse) String() string
type KeepaliveRequest ¶ added in v1.3.0
type KeepaliveRequest struct { // The number of nanoseconds since the epoch. // Used only for debugging keepalive requests. Time int64 `protobuf:"varint,1,opt,name=time" json:"time,omitempty"` }
Request that the process respond with a Keepalive to verify it is responding.
func (*KeepaliveRequest) Descriptor ¶ added in v1.3.0
func (*KeepaliveRequest) Descriptor() ([]byte, []int)
func (*KeepaliveRequest) ProtoMessage ¶ added in v1.3.0
func (*KeepaliveRequest) ProtoMessage()
func (*KeepaliveRequest) Reset ¶ added in v1.3.0
func (m *KeepaliveRequest) Reset()
func (*KeepaliveRequest) String ¶ added in v1.3.0
func (m *KeepaliveRequest) String() string
type KeepaliveResponse ¶ added in v1.3.0
type KeepaliveResponse struct { // The number of nanoseconds since the epoch. // Used only for debugging keepalive requests. Time int64 `protobuf:"varint,1,opt,name=time" json:"time,omitempty"` }
Respond to KeepaliveRequest
func (*KeepaliveResponse) Descriptor ¶ added in v1.3.0
func (*KeepaliveResponse) Descriptor() ([]byte, []int)
func (*KeepaliveResponse) ProtoMessage ¶ added in v1.3.0
func (*KeepaliveResponse) ProtoMessage()
func (*KeepaliveResponse) Reset ¶ added in v1.3.0
func (m *KeepaliveResponse) Reset()
func (*KeepaliveResponse) String ¶ added in v1.3.0
func (m *KeepaliveResponse) String() string
type Option ¶ added in v1.3.0
type Option struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Values []*OptionValue `protobuf:"bytes,2,rep,name=values" json:"values,omitempty"` }
func (*Option) Descriptor ¶ added in v1.3.0
func (*Option) GetValues ¶ added in v1.3.0
func (m *Option) GetValues() []*OptionValue
func (*Option) ProtoMessage ¶ added in v1.3.0
func (*Option) ProtoMessage()
type OptionInfo ¶ added in v1.3.0
type OptionInfo struct {
ValueTypes []ValueType `protobuf:"varint,1,rep,name=valueTypes,enum=agent.ValueType" json:"valueTypes,omitempty"`
}
func (*OptionInfo) Descriptor ¶ added in v1.3.0
func (*OptionInfo) Descriptor() ([]byte, []int)
func (*OptionInfo) ProtoMessage ¶ added in v1.3.0
func (*OptionInfo) ProtoMessage()
func (*OptionInfo) Reset ¶ added in v1.3.0
func (m *OptionInfo) Reset()
func (*OptionInfo) String ¶ added in v1.3.0
func (m *OptionInfo) String() string
type OptionValue ¶ added in v1.3.0
type OptionValue struct { Type ValueType `protobuf:"varint,1,opt,name=type,enum=agent.ValueType" json:"type,omitempty"` // Types that are valid to be assigned to Value: // *OptionValue_BoolValue // *OptionValue_IntValue // *OptionValue_DoubleValue // *OptionValue_StringValue // *OptionValue_DurationValue Value isOptionValue_Value `protobuf_oneof:"value"` }
func (*OptionValue) Descriptor ¶ added in v1.3.0
func (*OptionValue) Descriptor() ([]byte, []int)
func (*OptionValue) GetBoolValue ¶ added in v1.3.0
func (m *OptionValue) GetBoolValue() bool
func (*OptionValue) GetDoubleValue ¶ added in v1.3.0
func (m *OptionValue) GetDoubleValue() float64
func (*OptionValue) GetDurationValue ¶ added in v1.3.0
func (m *OptionValue) GetDurationValue() int64
func (*OptionValue) GetIntValue ¶ added in v1.3.0
func (m *OptionValue) GetIntValue() int64
func (*OptionValue) GetStringValue ¶ added in v1.3.0
func (m *OptionValue) GetStringValue() string
func (*OptionValue) GetValue ¶ added in v1.3.0
func (m *OptionValue) GetValue() isOptionValue_Value
func (*OptionValue) ProtoMessage ¶ added in v1.3.0
func (*OptionValue) ProtoMessage()
func (*OptionValue) Reset ¶ added in v1.3.0
func (m *OptionValue) Reset()
func (*OptionValue) String ¶ added in v1.3.0
func (m *OptionValue) String() string
func (*OptionValue) XXX_OneofFuncs ¶ added in v1.3.0
func (*OptionValue) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
type OptionValue_BoolValue ¶ added in v1.3.0
type OptionValue_BoolValue struct {
BoolValue bool `protobuf:"varint,2,opt,name=boolValue,oneof"`
}
type OptionValue_DoubleValue ¶ added in v1.3.0
type OptionValue_DoubleValue struct {
DoubleValue float64 `protobuf:"fixed64,4,opt,name=doubleValue,oneof"`
}
type OptionValue_DurationValue ¶ added in v1.3.0
type OptionValue_DurationValue struct {
DurationValue int64 `protobuf:"varint,6,opt,name=durationValue,oneof"`
}
type OptionValue_IntValue ¶ added in v1.3.0
type OptionValue_IntValue struct {
IntValue int64 `protobuf:"varint,3,opt,name=intValue,oneof"`
}
type OptionValue_StringValue ¶ added in v1.3.0
type OptionValue_StringValue struct {
StringValue string `protobuf:"bytes,5,opt,name=stringValue,oneof"`
}
type Point ¶ added in v1.3.0
type Point struct { Time int64 `protobuf:"varint,1,opt,name=time" json:"time,omitempty"` Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` Database string `protobuf:"bytes,3,opt,name=database" json:"database,omitempty"` RetentionPolicy string `protobuf:"bytes,4,opt,name=retentionPolicy" json:"retentionPolicy,omitempty"` Group string `protobuf:"bytes,5,opt,name=group" json:"group,omitempty"` Dimensions []string `protobuf:"bytes,6,rep,name=dimensions" json:"dimensions,omitempty"` Tags map[string]string `` /* 128-byte string literal not displayed */ FieldsDouble map[string]float64 `` /* 146-byte string literal not displayed */ FieldsInt map[string]int64 `` /* 139-byte string literal not displayed */ FieldsString map[string]string `` /* 145-byte string literal not displayed */ FieldsBool map[string]bool `` /* 142-byte string literal not displayed */ ByName bool `protobuf:"varint,11,opt,name=byName" json:"byName,omitempty"` }
Message containing information about a single data point. Can be sent on it's own or bookended by BeginBatch and EndBatch messages.
func (*Point) Descriptor ¶ added in v1.3.0
func (*Point) GetFieldsBool ¶ added in v1.4.0
func (*Point) GetFieldsDouble ¶ added in v1.3.0
func (*Point) GetFieldsInt ¶ added in v1.3.0
func (*Point) GetFieldsString ¶ added in v1.3.0
func (*Point) ProtoMessage ¶ added in v1.3.0
func (*Point) ProtoMessage()
type Request ¶ added in v1.3.0
type Request struct { // Types that are valid to be assigned to Message: // *Request_Info // *Request_Init // *Request_Keepalive // *Request_Snapshot // *Request_Restore // *Request_Begin // *Request_Point // *Request_End Message isRequest_Message `protobuf_oneof:"message"` }
Request message wrapper -- sent from Kapacitor to process
func (*Request) Descriptor ¶ added in v1.3.0
func (*Request) GetBegin ¶ added in v1.3.0
func (m *Request) GetBegin() *BeginBatch
func (*Request) GetInfo ¶ added in v1.3.0
func (m *Request) GetInfo() *InfoRequest
func (*Request) GetInit ¶ added in v1.3.0
func (m *Request) GetInit() *InitRequest
func (*Request) GetKeepalive ¶ added in v1.3.0
func (m *Request) GetKeepalive() *KeepaliveRequest
func (*Request) GetMessage ¶ added in v1.3.0
func (m *Request) GetMessage() isRequest_Message
func (*Request) GetRestore ¶ added in v1.3.0
func (m *Request) GetRestore() *RestoreRequest
func (*Request) GetSnapshot ¶ added in v1.3.0
func (m *Request) GetSnapshot() *SnapshotRequest
func (*Request) ProtoMessage ¶ added in v1.3.0
func (*Request) ProtoMessage()
func (*Request) XXX_OneofFuncs ¶ added in v1.3.0
func (*Request) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
type Request_Begin ¶ added in v1.3.0
type Request_Begin struct {
Begin *BeginBatch `protobuf:"bytes,16,opt,name=begin,oneof"`
}
type Request_End ¶ added in v1.3.0
type Request_End struct {
End *EndBatch `protobuf:"bytes,18,opt,name=end,oneof"`
}
type Request_Info ¶ added in v1.3.0
type Request_Info struct {
Info *InfoRequest `protobuf:"bytes,1,opt,name=info,oneof"`
}
type Request_Init ¶ added in v1.3.0
type Request_Init struct {
Init *InitRequest `protobuf:"bytes,2,opt,name=init,oneof"`
}
type Request_Keepalive ¶ added in v1.3.0
type Request_Keepalive struct {
Keepalive *KeepaliveRequest `protobuf:"bytes,3,opt,name=keepalive,oneof"`
}
type Request_Point ¶ added in v1.3.0
type Request_Point struct {
Point *Point `protobuf:"bytes,17,opt,name=point,oneof"`
}
type Request_Restore ¶ added in v1.3.0
type Request_Restore struct {
Restore *RestoreRequest `protobuf:"bytes,5,opt,name=restore,oneof"`
}
type Request_Snapshot ¶ added in v1.3.0
type Request_Snapshot struct {
Snapshot *SnapshotRequest `protobuf:"bytes,4,opt,name=snapshot,oneof"`
}
type Response ¶ added in v1.3.0
type Response struct { // Types that are valid to be assigned to Message: // *Response_Info // *Response_Init // *Response_Keepalive // *Response_Snapshot // *Response_Restore // *Response_Error // *Response_Begin // *Response_Point // *Response_End Message isResponse_Message `protobuf_oneof:"message"` }
Response message wrapper -- sent from process to Kapacitor
func (*Response) Descriptor ¶ added in v1.3.0
func (*Response) GetBegin ¶ added in v1.3.0
func (m *Response) GetBegin() *BeginBatch
func (*Response) GetError ¶ added in v1.3.0
func (m *Response) GetError() *ErrorResponse
func (*Response) GetInfo ¶ added in v1.3.0
func (m *Response) GetInfo() *InfoResponse
func (*Response) GetInit ¶ added in v1.3.0
func (m *Response) GetInit() *InitResponse
func (*Response) GetKeepalive ¶ added in v1.3.0
func (m *Response) GetKeepalive() *KeepaliveResponse
func (*Response) GetMessage ¶ added in v1.3.0
func (m *Response) GetMessage() isResponse_Message
func (*Response) GetRestore ¶ added in v1.3.0
func (m *Response) GetRestore() *RestoreResponse
func (*Response) GetSnapshot ¶ added in v1.3.0
func (m *Response) GetSnapshot() *SnapshotResponse
func (*Response) ProtoMessage ¶ added in v1.3.0
func (*Response) ProtoMessage()
func (*Response) XXX_OneofFuncs ¶ added in v1.3.0
func (*Response) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
type Response_Begin ¶ added in v1.3.0
type Response_Begin struct {
Begin *BeginBatch `protobuf:"bytes,16,opt,name=begin,oneof"`
}
type Response_End ¶ added in v1.3.0
type Response_End struct {
End *EndBatch `protobuf:"bytes,18,opt,name=end,oneof"`
}
type Response_Error ¶ added in v1.3.0
type Response_Error struct {
Error *ErrorResponse `protobuf:"bytes,6,opt,name=error,oneof"`
}
type Response_Info ¶ added in v1.3.0
type Response_Info struct {
Info *InfoResponse `protobuf:"bytes,1,opt,name=info,oneof"`
}
type Response_Init ¶ added in v1.3.0
type Response_Init struct {
Init *InitResponse `protobuf:"bytes,2,opt,name=init,oneof"`
}
type Response_Keepalive ¶ added in v1.3.0
type Response_Keepalive struct {
Keepalive *KeepaliveResponse `protobuf:"bytes,3,opt,name=keepalive,oneof"`
}
type Response_Point ¶ added in v1.3.0
type Response_Point struct {
Point *Point `protobuf:"bytes,17,opt,name=point,oneof"`
}
type Response_Restore ¶ added in v1.3.0
type Response_Restore struct {
Restore *RestoreResponse `protobuf:"bytes,5,opt,name=restore,oneof"`
}
type Response_Snapshot ¶ added in v1.3.0
type Response_Snapshot struct {
Snapshot *SnapshotResponse `protobuf:"bytes,4,opt,name=snapshot,oneof"`
}
type RestoreRequest ¶ added in v1.3.0
type RestoreRequest struct {
Snapshot []byte `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"`
}
Request that the process restore its state from a snapshot.
func (*RestoreRequest) Descriptor ¶ added in v1.3.0
func (*RestoreRequest) Descriptor() ([]byte, []int)
func (*RestoreRequest) ProtoMessage ¶ added in v1.3.0
func (*RestoreRequest) ProtoMessage()
func (*RestoreRequest) Reset ¶ added in v1.3.0
func (m *RestoreRequest) Reset()
func (*RestoreRequest) String ¶ added in v1.3.0
func (m *RestoreRequest) String() string
type RestoreResponse ¶ added in v1.3.0
type RestoreResponse struct { Success bool `protobuf:"varint,1,opt,name=success" json:"success,omitempty"` Error string `protobuf:"bytes,2,opt,name=error" json:"error,omitempty"` }
Respond with success or failure to a RestoreRequest
func (*RestoreResponse) Descriptor ¶ added in v1.3.0
func (*RestoreResponse) Descriptor() ([]byte, []int)
func (*RestoreResponse) ProtoMessage ¶ added in v1.3.0
func (*RestoreResponse) ProtoMessage()
func (*RestoreResponse) Reset ¶ added in v1.3.0
func (m *RestoreResponse) Reset()
func (*RestoreResponse) String ¶ added in v1.3.0
func (m *RestoreResponse) String() string
type Server ¶ added in v0.13.0
type Server struct {
// contains filtered or unexported fields
}
A server accepts connections on a listener and spawns new Agents for each connection.
func (*Server) Stop ¶ added in v0.13.0
func (s *Server) Stop()
Stop closes the listener and stops all server activity.
func (*Server) StopOnSignals ¶ added in v0.13.0
StopOnSignals registers a signal handler to stop the Server for the given signals.
type SnapshotRequest ¶ added in v1.3.0
type SnapshotRequest struct { }
Request that the process provide a snapshot of its state.
func (*SnapshotRequest) Descriptor ¶ added in v1.3.0
func (*SnapshotRequest) Descriptor() ([]byte, []int)
func (*SnapshotRequest) ProtoMessage ¶ added in v1.3.0
func (*SnapshotRequest) ProtoMessage()
func (*SnapshotRequest) Reset ¶ added in v1.3.0
func (m *SnapshotRequest) Reset()
func (*SnapshotRequest) String ¶ added in v1.3.0
func (m *SnapshotRequest) String() string
type SnapshotResponse ¶ added in v1.3.0
type SnapshotResponse struct {
Snapshot []byte `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"`
}
Respond to Kapacitor with a serialized snapshot of the running state.
func (*SnapshotResponse) Descriptor ¶ added in v1.3.0
func (*SnapshotResponse) Descriptor() ([]byte, []int)
func (*SnapshotResponse) ProtoMessage ¶ added in v1.3.0
func (*SnapshotResponse) ProtoMessage()
func (*SnapshotResponse) Reset ¶ added in v1.3.0
func (m *SnapshotResponse) Reset()
func (*SnapshotResponse) String ¶ added in v1.3.0
func (m *SnapshotResponse) String() string
type ValueType ¶ added in v1.3.0
type ValueType int32