Documentation
¶
Index ¶
- Variables
- func RegisterPluginServer(s *grpc.Server, srv PluginServer)
- type Autoscaler
- func (*Autoscaler) Descriptor() ([]byte, []int)
- func (m *Autoscaler) GetType() string
- func (m *Autoscaler) GetYaml() string
- func (*Autoscaler) ProtoMessage()
- func (m *Autoscaler) Reset()
- func (m *Autoscaler) String() string
- func (m *Autoscaler) XXX_DiscardUnknown()
- func (m *Autoscaler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Autoscaler) XXX_Merge(src proto.Message)
- func (m *Autoscaler) XXX_Size() int
- func (m *Autoscaler) XXX_Unmarshal(b []byte) error
- type Empty
- func (*Empty) Descriptor() ([]byte, []int)
- func (*Empty) ProtoMessage()
- func (m *Empty) Reset()
- func (m *Empty) String() string
- func (m *Empty) XXX_DiscardUnknown()
- func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Empty) XXX_Merge(src proto.Message)
- func (m *Empty) XXX_Size() int
- func (m *Empty) XXX_Unmarshal(b []byte) error
- type EventRequest
- func (*EventRequest) Descriptor() ([]byte, []int)
- func (m *EventRequest) GetAutoscaler() *Autoscaler
- func (m *EventRequest) GetObjectOneof() isEventRequest_ObjectOneof
- func (m *EventRequest) GetPartition() string
- func (m *EventRequest) GetPod() *Pod
- func (m *EventRequest) GetTime() int64
- func (m *EventRequest) GetType() EventType
- func (*EventRequest) ProtoMessage()
- func (m *EventRequest) Reset()
- func (m *EventRequest) String() string
- func (m *EventRequest) XXX_DiscardUnknown()
- func (m *EventRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EventRequest) XXX_Merge(src proto.Message)
- func (*EventRequest) XXX_OneofWrappers() []interface{}
- func (m *EventRequest) XXX_Size() int
- func (m *EventRequest) XXX_Unmarshal(b []byte) error
- type EventRequest_Autoscaler
- type EventRequest_Pod
- type EventType
- type MetricType
- type PluginClient
- type PluginServer
- type Pod
- func (*Pod) Descriptor() ([]byte, []int)
- func (m *Pod) GetCpuRequest() int32
- func (m *Pod) GetLastTransition() int64
- func (m *Pod) GetName() string
- func (m *Pod) GetState() string
- func (*Pod) ProtoMessage()
- func (m *Pod) Reset()
- func (m *Pod) String() string
- func (m *Pod) XXX_DiscardUnknown()
- func (m *Pod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Pod) XXX_Merge(src proto.Message)
- func (m *Pod) XXX_Size() int
- func (m *Pod) XXX_Unmarshal(b []byte) error
- type ScaleRequest
- func (*ScaleRequest) Descriptor() ([]byte, []int)
- func (m *ScaleRequest) GetPartition() string
- func (m *ScaleRequest) GetTime() int64
- func (*ScaleRequest) ProtoMessage()
- func (m *ScaleRequest) Reset()
- func (m *ScaleRequest) String() string
- func (m *ScaleRequest) XXX_DiscardUnknown()
- func (m *ScaleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ScaleRequest) XXX_Merge(src proto.Message)
- func (m *ScaleRequest) XXX_Size() int
- func (m *ScaleRequest) XXX_Unmarshal(b []byte) error
- type ScaleResponse
- func (*ScaleResponse) Descriptor() ([]byte, []int)
- func (m *ScaleResponse) GetRec() int32
- func (*ScaleResponse) ProtoMessage()
- func (m *ScaleResponse) Reset()
- func (m *ScaleResponse) String() string
- func (m *ScaleResponse) XXX_DiscardUnknown()
- func (m *ScaleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ScaleResponse) XXX_Merge(src proto.Message)
- func (m *ScaleResponse) XXX_Size() int
- func (m *ScaleResponse) XXX_Unmarshal(b []byte) error
- type Stat
- func (*Stat) Descriptor() ([]byte, []int)
- func (m *Stat) GetPodName() string
- func (m *Stat) GetTime() int64
- func (m *Stat) GetType() MetricType
- func (m *Stat) GetValue() int32
- func (*Stat) ProtoMessage()
- func (m *Stat) Reset()
- func (m *Stat) String() string
- func (m *Stat) XXX_DiscardUnknown()
- func (m *Stat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Stat) XXX_Merge(src proto.Message)
- func (m *Stat) XXX_Size() int
- func (m *Stat) XXX_Unmarshal(b []byte) error
- type StatRequest
- func (*StatRequest) Descriptor() ([]byte, []int)
- func (m *StatRequest) GetPartition() string
- func (m *StatRequest) GetStat() []*Stat
- func (*StatRequest) ProtoMessage()
- func (m *StatRequest) Reset()
- func (m *StatRequest) String() string
- func (m *StatRequest) XXX_DiscardUnknown()
- func (m *StatRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StatRequest) XXX_Merge(src proto.Message)
- func (m *StatRequest) XXX_Size() int
- func (m *StatRequest) XXX_Unmarshal(b []byte) error
- type UnimplementedPluginServer
Constants ¶
This section is empty.
Variables ¶
View Source
var EventType_name = map[int32]string{
0: "CREATE",
1: "UPDATE",
2: "DELETE",
}
View Source
var EventType_value = map[string]int32{
"CREATE": 0,
"UPDATE": 1,
"DELETE": 2,
}
View Source
var MetricType_name = map[int32]string{
0: "CPU_MILLIS",
1: "CONCURRENT_REQUESTS_MILLIS",
}
View Source
var MetricType_value = map[string]int32{
"CPU_MILLIS": 0,
"CONCURRENT_REQUESTS_MILLIS": 1,
}
Functions ¶
func RegisterPluginServer ¶
func RegisterPluginServer(s *grpc.Server, srv PluginServer)
Types ¶
type Autoscaler ¶
type Autoscaler struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` Yaml string `protobuf:"bytes,2,opt,name=yaml,proto3" json:"yaml,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Autoscaler) Descriptor ¶
func (*Autoscaler) Descriptor() ([]byte, []int)
func (*Autoscaler) GetType ¶
func (m *Autoscaler) GetType() string
func (*Autoscaler) GetYaml ¶
func (m *Autoscaler) GetYaml() string
func (*Autoscaler) ProtoMessage ¶
func (*Autoscaler) ProtoMessage()
func (*Autoscaler) Reset ¶
func (m *Autoscaler) Reset()
func (*Autoscaler) String ¶
func (m *Autoscaler) String() string
func (*Autoscaler) XXX_DiscardUnknown ¶
func (m *Autoscaler) XXX_DiscardUnknown()
func (*Autoscaler) XXX_Marshal ¶
func (m *Autoscaler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Autoscaler) XXX_Merge ¶
func (m *Autoscaler) XXX_Merge(src proto.Message)
func (*Autoscaler) XXX_Size ¶
func (m *Autoscaler) XXX_Size() int
func (*Autoscaler) XXX_Unmarshal ¶
func (m *Autoscaler) XXX_Unmarshal(b []byte) error
type Empty ¶
type Empty struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Empty) Descriptor ¶
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) XXX_DiscardUnknown ¶
func (m *Empty) XXX_DiscardUnknown()
func (*Empty) XXX_Marshal ¶
func (*Empty) XXX_Unmarshal ¶
type EventRequest ¶
type EventRequest struct { Partition string `protobuf:"bytes,1,opt,name=partition,proto3" json:"partition,omitempty"` Time int64 `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"` Type EventType `protobuf:"varint,3,opt,name=type,proto3,enum=proto.EventType" json:"type,omitempty"` // Types that are valid to be assigned to ObjectOneof: // *EventRequest_Autoscaler // *EventRequest_Pod ObjectOneof isEventRequest_ObjectOneof `protobuf_oneof:"object_oneof"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*EventRequest) Descriptor ¶
func (*EventRequest) Descriptor() ([]byte, []int)
func (*EventRequest) GetAutoscaler ¶
func (m *EventRequest) GetAutoscaler() *Autoscaler
func (*EventRequest) GetObjectOneof ¶
func (m *EventRequest) GetObjectOneof() isEventRequest_ObjectOneof
func (*EventRequest) GetPartition ¶
func (m *EventRequest) GetPartition() string
func (*EventRequest) GetPod ¶
func (m *EventRequest) GetPod() *Pod
func (*EventRequest) GetTime ¶
func (m *EventRequest) GetTime() int64
func (*EventRequest) GetType ¶
func (m *EventRequest) GetType() EventType
func (*EventRequest) ProtoMessage ¶
func (*EventRequest) ProtoMessage()
func (*EventRequest) Reset ¶
func (m *EventRequest) Reset()
func (*EventRequest) String ¶
func (m *EventRequest) String() string
func (*EventRequest) XXX_DiscardUnknown ¶
func (m *EventRequest) XXX_DiscardUnknown()
func (*EventRequest) XXX_Marshal ¶
func (m *EventRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EventRequest) XXX_Merge ¶
func (m *EventRequest) XXX_Merge(src proto.Message)
func (*EventRequest) XXX_OneofWrappers ¶
func (*EventRequest) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*EventRequest) XXX_Size ¶
func (m *EventRequest) XXX_Size() int
func (*EventRequest) XXX_Unmarshal ¶
func (m *EventRequest) XXX_Unmarshal(b []byte) error
type EventRequest_Autoscaler ¶
type EventRequest_Autoscaler struct {
Autoscaler *Autoscaler `protobuf:"bytes,4,opt,name=autoscaler,proto3,oneof"`
}
type EventRequest_Pod ¶
type EventRequest_Pod struct {
Pod *Pod `protobuf:"bytes,5,opt,name=pod,proto3,oneof"`
}
type MetricType ¶
type MetricType int32
const ( MetricType_CPU_MILLIS MetricType = 0 MetricType_CONCURRENT_REQUESTS_MILLIS MetricType = 1 )
func (MetricType) EnumDescriptor ¶
func (MetricType) EnumDescriptor() ([]byte, []int)
func (MetricType) String ¶
func (x MetricType) String() string
type PluginClient ¶
type PluginClient interface { Event(ctx context.Context, in *EventRequest, opts ...grpc.CallOption) (*Empty, error) Stat(ctx context.Context, in *StatRequest, opts ...grpc.CallOption) (*Empty, error) Scale(ctx context.Context, in *ScaleRequest, opts ...grpc.CallOption) (*ScaleResponse, error) }
PluginClient is the client API for Plugin service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewPluginClient ¶
func NewPluginClient(cc *grpc.ClientConn) PluginClient
type PluginServer ¶
type PluginServer interface { Event(context.Context, *EventRequest) (*Empty, error) Stat(context.Context, *StatRequest) (*Empty, error) Scale(context.Context, *ScaleRequest) (*ScaleResponse, error) }
PluginServer is the server API for Plugin service.
type Pod ¶
type Pod struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` State string `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` LastTransition int64 `protobuf:"varint,3,opt,name=last_transition,json=lastTransition,proto3" json:"last_transition,omitempty"` CpuRequest int32 `protobuf:"varint,4,opt,name=cpu_request,json=cpuRequest,proto3" json:"cpu_request,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Pod) Descriptor ¶
func (*Pod) GetCpuRequest ¶
func (*Pod) GetLastTransition ¶
func (*Pod) ProtoMessage ¶
func (*Pod) ProtoMessage()
func (*Pod) XXX_DiscardUnknown ¶
func (m *Pod) XXX_DiscardUnknown()
func (*Pod) XXX_Unmarshal ¶
type ScaleRequest ¶
type ScaleRequest struct { Partition string `protobuf:"bytes,1,opt,name=partition,proto3" json:"partition,omitempty"` Time int64 `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ScaleRequest) Descriptor ¶
func (*ScaleRequest) Descriptor() ([]byte, []int)
func (*ScaleRequest) GetPartition ¶
func (m *ScaleRequest) GetPartition() string
func (*ScaleRequest) GetTime ¶
func (m *ScaleRequest) GetTime() int64
func (*ScaleRequest) ProtoMessage ¶
func (*ScaleRequest) ProtoMessage()
func (*ScaleRequest) Reset ¶
func (m *ScaleRequest) Reset()
func (*ScaleRequest) String ¶
func (m *ScaleRequest) String() string
func (*ScaleRequest) XXX_DiscardUnknown ¶
func (m *ScaleRequest) XXX_DiscardUnknown()
func (*ScaleRequest) XXX_Marshal ¶
func (m *ScaleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ScaleRequest) XXX_Merge ¶
func (m *ScaleRequest) XXX_Merge(src proto.Message)
func (*ScaleRequest) XXX_Size ¶
func (m *ScaleRequest) XXX_Size() int
func (*ScaleRequest) XXX_Unmarshal ¶
func (m *ScaleRequest) XXX_Unmarshal(b []byte) error
type ScaleResponse ¶
type ScaleResponse struct { Rec int32 `protobuf:"varint,1,opt,name=rec,proto3" json:"rec,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ScaleResponse) Descriptor ¶
func (*ScaleResponse) Descriptor() ([]byte, []int)
func (*ScaleResponse) GetRec ¶
func (m *ScaleResponse) GetRec() int32
func (*ScaleResponse) ProtoMessage ¶
func (*ScaleResponse) ProtoMessage()
func (*ScaleResponse) Reset ¶
func (m *ScaleResponse) Reset()
func (*ScaleResponse) String ¶
func (m *ScaleResponse) String() string
func (*ScaleResponse) XXX_DiscardUnknown ¶
func (m *ScaleResponse) XXX_DiscardUnknown()
func (*ScaleResponse) XXX_Marshal ¶
func (m *ScaleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ScaleResponse) XXX_Merge ¶
func (m *ScaleResponse) XXX_Merge(src proto.Message)
func (*ScaleResponse) XXX_Size ¶
func (m *ScaleResponse) XXX_Size() int
func (*ScaleResponse) XXX_Unmarshal ¶
func (m *ScaleResponse) XXX_Unmarshal(b []byte) error
type Stat ¶
type Stat struct { Time int64 `protobuf:"varint,1,opt,name=time,proto3" json:"time,omitempty"` PodName string `protobuf:"bytes,2,opt,name=pod_name,json=podName,proto3" json:"pod_name,omitempty"` Type MetricType `protobuf:"varint,3,opt,name=type,proto3,enum=proto.MetricType" json:"type,omitempty"` Value int32 `protobuf:"varint,4,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Stat) Descriptor ¶
func (*Stat) GetPodName ¶
func (*Stat) GetType ¶
func (m *Stat) GetType() MetricType
func (*Stat) ProtoMessage ¶
func (*Stat) ProtoMessage()
func (*Stat) XXX_DiscardUnknown ¶
func (m *Stat) XXX_DiscardUnknown()
func (*Stat) XXX_Unmarshal ¶
type StatRequest ¶
type StatRequest struct { Partition string `protobuf:"bytes,1,opt,name=partition,proto3" json:"partition,omitempty"` Stat []*Stat `protobuf:"bytes,2,rep,name=stat,proto3" json:"stat,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*StatRequest) Descriptor ¶
func (*StatRequest) Descriptor() ([]byte, []int)
func (*StatRequest) GetPartition ¶
func (m *StatRequest) GetPartition() string
func (*StatRequest) GetStat ¶
func (m *StatRequest) GetStat() []*Stat
func (*StatRequest) ProtoMessage ¶
func (*StatRequest) ProtoMessage()
func (*StatRequest) Reset ¶
func (m *StatRequest) Reset()
func (*StatRequest) String ¶
func (m *StatRequest) String() string
func (*StatRequest) XXX_DiscardUnknown ¶
func (m *StatRequest) XXX_DiscardUnknown()
func (*StatRequest) XXX_Marshal ¶
func (m *StatRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StatRequest) XXX_Merge ¶
func (m *StatRequest) XXX_Merge(src proto.Message)
func (*StatRequest) XXX_Size ¶
func (m *StatRequest) XXX_Size() int
func (*StatRequest) XXX_Unmarshal ¶
func (m *StatRequest) XXX_Unmarshal(b []byte) error
type UnimplementedPluginServer ¶
type UnimplementedPluginServer struct { }
UnimplementedPluginServer can be embedded to have forward compatible implementations.
func (*UnimplementedPluginServer) Event ¶
func (*UnimplementedPluginServer) Event(ctx context.Context, req *EventRequest) (*Empty, error)
func (*UnimplementedPluginServer) Scale ¶
func (*UnimplementedPluginServer) Scale(ctx context.Context, req *ScaleRequest) (*ScaleResponse, error)
func (*UnimplementedPluginServer) Stat ¶
func (*UnimplementedPluginServer) Stat(ctx context.Context, req *StatRequest) (*Empty, error)
Click to show internal directories.
Click to hide internal directories.