worker

package
v0.0.0-...-6e2cd59 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_idl_proto_worker_proto protoreflect.FileDescriptor

Functions

func RegisterWorkerServer

func RegisterWorkerServer(s *grpc.Server, srv WorkerServer)

Types

type Ack

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

func (*Ack) Descriptor deprecated

func (*Ack) Descriptor() ([]byte, []int)

Deprecated: Use Ack.ProtoReflect.Descriptor instead.

func (*Ack) ProtoMessage

func (*Ack) ProtoMessage()

func (*Ack) ProtoReflect

func (x *Ack) ProtoReflect() protoreflect.Message

func (*Ack) Reset

func (x *Ack) Reset()

func (*Ack) String

func (x *Ack) String() string

type Finish

type Finish struct {
	JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
	// contains filtered or unexported fields
}

func (*Finish) Descriptor deprecated

func (*Finish) Descriptor() ([]byte, []int)

Deprecated: Use Finish.ProtoReflect.Descriptor instead.

func (*Finish) GetJobId

func (x *Finish) GetJobId() string

func (*Finish) ProtoMessage

func (*Finish) ProtoMessage()

func (*Finish) ProtoReflect

func (x *Finish) ProtoReflect() protoreflect.Message

func (*Finish) Reset

func (x *Finish) Reset()

func (*Finish) String

func (x *Finish) String() string

type HTTPRequest

type HTTPRequest struct {
	Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
	Url    string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
	// contains filtered or unexported fields
}

func (*HTTPRequest) Descriptor deprecated

func (*HTTPRequest) Descriptor() ([]byte, []int)

Deprecated: Use HTTPRequest.ProtoReflect.Descriptor instead.

func (*HTTPRequest) GetMethod

func (x *HTTPRequest) GetMethod() string

func (*HTTPRequest) GetUrl

func (x *HTTPRequest) GetUrl() string

func (*HTTPRequest) ProtoMessage

func (*HTTPRequest) ProtoMessage()

func (*HTTPRequest) ProtoReflect

func (x *HTTPRequest) ProtoReflect() protoreflect.Message

func (*HTTPRequest) Reset

func (x *HTTPRequest) Reset()

func (*HTTPRequest) String

func (x *HTTPRequest) String() string

type Message

type Message struct {

	// Types that are assignable to Payload:
	//	*Message_Register
	//	*Message_Start
	//	*Message_Metrics
	//	*Message_Finish
	//	*Message_Stop
	//	*Message_Ack
	Payload isMessage_Payload `protobuf_oneof:"payload"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

func (*Message) Descriptor() ([]byte, []int)

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetAck

func (x *Message) GetAck() *Ack

func (*Message) GetFinish

func (x *Message) GetFinish() *Finish

func (*Message) GetMetrics

func (x *Message) GetMetrics() *Metrics

func (*Message) GetPayload

func (m *Message) GetPayload() isMessage_Payload

func (*Message) GetRegister

func (x *Message) GetRegister() *Register

func (*Message) GetStart

func (x *Message) GetStart() *Start

func (*Message) GetStop

func (x *Message) GetStop() *Stop

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

func (x *Message) ProtoReflect() protoreflect.Message

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type Message_Ack

type Message_Ack struct {
	Ack *Ack `protobuf:"bytes,6,opt,name=ack,proto3,oneof"`
}

type Message_Finish

type Message_Finish struct {
	Finish *Finish `protobuf:"bytes,4,opt,name=finish,proto3,oneof"`
}

type Message_Metrics

type Message_Metrics struct {
	Metrics *Metrics `protobuf:"bytes,3,opt,name=metrics,proto3,oneof"`
}

type Message_Register

type Message_Register struct {
	Register *Register `protobuf:"bytes,1,opt,name=register,proto3,oneof"`
}

type Message_Start

type Message_Start struct {
	Start *Start `protobuf:"bytes,2,opt,name=start,proto3,oneof"`
}

type Message_Stop

type Message_Stop struct {
	Stop *Stop `protobuf:"bytes,5,opt,name=stop,proto3,oneof"`
}

type Metrics

type Metrics struct {
	JobId    string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
	Code     uint32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"`
	BytesIn  uint64 `protobuf:"varint,3,opt,name=bytes_in,json=bytesIn,proto3" json:"bytes_in,omitempty"`
	BytesOut uint64 `protobuf:"varint,4,opt,name=bytes_out,json=bytesOut,proto3" json:"bytes_out,omitempty"`
	// Nanoseconds
	Latency int64  `protobuf:"varint,5,opt,name=latency,proto3" json:"latency,omitempty"`
	Error   string `protobuf:"bytes,6,opt,name=error,proto3" json:"error,omitempty"`
	// https://godoc.org/github.com/golang/protobuf/ptypes#TimestampProto
	Timestamp *timestamp.Timestamp `protobuf:"bytes,7,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*Metrics) Descriptor deprecated

func (*Metrics) Descriptor() ([]byte, []int)

Deprecated: Use Metrics.ProtoReflect.Descriptor instead.

func (*Metrics) GetBytesIn

func (x *Metrics) GetBytesIn() uint64

func (*Metrics) GetBytesOut

func (x *Metrics) GetBytesOut() uint64

func (*Metrics) GetCode

func (x *Metrics) GetCode() uint32

func (*Metrics) GetError

func (x *Metrics) GetError() string

func (*Metrics) GetJobId

func (x *Metrics) GetJobId() string

func (*Metrics) GetLatency

func (x *Metrics) GetLatency() int64

func (*Metrics) GetTimestamp

func (x *Metrics) GetTimestamp() *timestamp.Timestamp

func (*Metrics) ProtoMessage

func (*Metrics) ProtoMessage()

func (*Metrics) ProtoReflect

func (x *Metrics) ProtoReflect() protoreflect.Message

func (*Metrics) Reset

func (x *Metrics) Reset()

func (*Metrics) String

func (x *Metrics) String() string

type Register

type Register struct {
	Group     string `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
	Instance  string `protobuf:"bytes,2,opt,name=instance,proto3" json:"instance,omitempty"`
	Frequency uint64 `protobuf:"varint,3,opt,name=frequency,proto3" json:"frequency,omitempty"`
	// contains filtered or unexported fields
}

func (*Register) Descriptor deprecated

func (*Register) Descriptor() ([]byte, []int)

Deprecated: Use Register.ProtoReflect.Descriptor instead.

func (*Register) GetFrequency

func (x *Register) GetFrequency() uint64

func (*Register) GetGroup

func (x *Register) GetGroup() string

func (*Register) GetInstance

func (x *Register) GetInstance() string

func (*Register) ProtoMessage

func (*Register) ProtoMessage()

func (*Register) ProtoReflect

func (x *Register) ProtoReflect() protoreflect.Message

func (*Register) Reset

func (x *Register) Reset()

func (*Register) String

func (x *Register) String() string

type Start

type Start struct {

	// Each job is split into multiple workloads, each workload with the same job id
	JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
	// requests / second
	Frequency uint64 `protobuf:"varint,2,opt,name=frequency,proto3" json:"frequency,omitempty"`
	// seconds
	Duration uint64       `protobuf:"varint,3,opt,name=duration,proto3" json:"duration,omitempty"`
	Request  *HTTPRequest `protobuf:"bytes,4,opt,name=request,proto3" json:"request,omitempty"`
	// contains filtered or unexported fields
}

func (*Start) Descriptor deprecated

func (*Start) Descriptor() ([]byte, []int)

Deprecated: Use Start.ProtoReflect.Descriptor instead.

func (*Start) GetDuration

func (x *Start) GetDuration() uint64

func (*Start) GetFrequency

func (x *Start) GetFrequency() uint64

func (*Start) GetJobId

func (x *Start) GetJobId() string

func (*Start) GetRequest

func (x *Start) GetRequest() *HTTPRequest

func (*Start) ProtoMessage

func (*Start) ProtoMessage()

func (*Start) ProtoReflect

func (x *Start) ProtoReflect() protoreflect.Message

func (*Start) Reset

func (x *Start) Reset()

func (*Start) String

func (x *Start) String() string

type Stop

type Stop struct {
	JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
	// contains filtered or unexported fields
}

func (*Stop) Descriptor deprecated

func (*Stop) Descriptor() ([]byte, []int)

Deprecated: Use Stop.ProtoReflect.Descriptor instead.

func (*Stop) GetJobId

func (x *Stop) GetJobId() string

func (*Stop) ProtoMessage

func (*Stop) ProtoMessage()

func (*Stop) ProtoReflect

func (x *Stop) ProtoReflect() protoreflect.Message

func (*Stop) Reset

func (x *Stop) Reset()

func (*Stop) String

func (x *Stop) String() string

type UnimplementedWorkerServer

type UnimplementedWorkerServer struct {
}

UnimplementedWorkerServer must be embedded to have forward compatible implementations.

func (*UnimplementedWorkerServer) Coordinate

type WorkerClient

type WorkerClient interface {
	Coordinate(ctx context.Context, opts ...grpc.CallOption) (Worker_CoordinateClient, error)
}

WorkerClient is the client API for Worker service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewWorkerClient

func NewWorkerClient(cc grpc.ClientConnInterface) WorkerClient

type WorkerServer

type WorkerServer interface {
	Coordinate(Worker_CoordinateServer) error
	// contains filtered or unexported methods
}

WorkerServer is the server API for Worker service. All implementations must embed UnimplementedWorkerServer for forward compatibility

type Worker_CoordinateClient

type Worker_CoordinateClient interface {
	Send(*Message) error
	Recv() (*Message, error)
	grpc.ClientStream
}

type Worker_CoordinateServer

type Worker_CoordinateServer interface {
	Send(*Message) error
	Recv() (*Message, error)
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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