proto

package
Version: v0.0.0-...-b71e5f6 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2019 License: MIT Imports: 7 Imported by: 2

Documentation

Index

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) Descriptor() ([]byte, []int)

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) String

func (m *Empty) String() string

func (*Empty) XXX_DiscardUnknown

func (m *Empty) XXX_DiscardUnknown()

func (*Empty) XXX_Marshal

func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Empty) XXX_Merge

func (m *Empty) XXX_Merge(src proto.Message)

func (*Empty) XXX_Size

func (m *Empty) XXX_Size() int

func (*Empty) XXX_Unmarshal

func (m *Empty) XXX_Unmarshal(b []byte) error

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 EventType

type EventType int32
const (
	EventType_CREATE EventType = 0
	EventType_UPDATE EventType = 1
	EventType_DELETE EventType = 2
)

func (EventType) EnumDescriptor

func (EventType) EnumDescriptor() ([]byte, []int)

func (EventType) String

func (x EventType) String() string

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) Descriptor() ([]byte, []int)

func (*Pod) GetCpuRequest

func (m *Pod) GetCpuRequest() int32

func (*Pod) GetLastTransition

func (m *Pod) GetLastTransition() int64

func (*Pod) GetName

func (m *Pod) GetName() string

func (*Pod) GetState

func (m *Pod) GetState() string

func (*Pod) ProtoMessage

func (*Pod) ProtoMessage()

func (*Pod) Reset

func (m *Pod) Reset()

func (*Pod) String

func (m *Pod) String() string

func (*Pod) XXX_DiscardUnknown

func (m *Pod) XXX_DiscardUnknown()

func (*Pod) XXX_Marshal

func (m *Pod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Pod) XXX_Merge

func (m *Pod) XXX_Merge(src proto.Message)

func (*Pod) XXX_Size

func (m *Pod) XXX_Size() int

func (*Pod) XXX_Unmarshal

func (m *Pod) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*Stat) GetPodName

func (m *Stat) GetPodName() string

func (*Stat) GetTime

func (m *Stat) GetTime() int64

func (*Stat) GetType

func (m *Stat) GetType() MetricType

func (*Stat) GetValue

func (m *Stat) GetValue() int32

func (*Stat) ProtoMessage

func (*Stat) ProtoMessage()

func (*Stat) Reset

func (m *Stat) Reset()

func (*Stat) String

func (m *Stat) String() string

func (*Stat) XXX_DiscardUnknown

func (m *Stat) XXX_DiscardUnknown()

func (*Stat) XXX_Marshal

func (m *Stat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Stat) XXX_Merge

func (m *Stat) XXX_Merge(src proto.Message)

func (*Stat) XXX_Size

func (m *Stat) XXX_Size() int

func (*Stat) XXX_Unmarshal

func (m *Stat) XXX_Unmarshal(b []byte) error

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) Scale

func (*UnimplementedPluginServer) Stat

Source Files

Jump to

Keyboard shortcuts

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