worker

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

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

Go to latest
Published: Apr 28, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InvokeResponse_Code_name = map[int32]string{
		0: "OK",
		1: "NO_SUCH_FUNCTION",
		2: "RUNTIME_ERROR",
		3: "RETRY",
	}
	InvokeResponse_Code_value = map[string]int32{
		"OK":               0,
		"NO_SUCH_FUNCTION": 1,
		"RUNTIME_ERROR":    2,
		"RETRY":            3,
	}
)

Enum value maps for InvokeResponse_Code.

View Source
var (
	RegisterResponse_Code_name = map[int32]string{
		0: "OK",
		1: "ERROR",
	}
	RegisterResponse_Code_value = map[string]int32{
		"OK":    0,
		"ERROR": 1,
	}
)

Enum value maps for RegisterResponse_Code.

View Source
var (
	ResetResponse_Code_name = map[int32]string{
		0: "OK",
		1: "ERROR",
	}
	ResetResponse_Code_value = map[string]int32{
		"OK":    0,
		"ERROR": 1,
	}
)

Enum value maps for ResetResponse_Code.

View Source
var (
	InitFunctionResponse_Code_name = map[int32]string{
		0: "OK",
		1: "ERROR",
	}
	InitFunctionResponse_Code_value = map[string]int32{
		"OK":    0,
		"ERROR": 1,
	}
)

Enum value maps for InitFunctionResponse_Code.

View Source
var File_worker_worker_proto protoreflect.FileDescriptor

Functions

func RegisterWorkerServer

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

Types

type InitFunctionRequest

type InitFunctionRequest struct {
	FuncName   string `protobuf:"bytes,1,opt,name=funcName,proto3" json:"funcName,omitempty"`
	Image      string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"`
	Runtime    string `protobuf:"bytes,3,opt,name=runtime,proto3" json:"runtime,omitempty"`
	CodeURI    string `protobuf:"bytes,4,opt,name=codeURI,proto3" json:"codeURI,omitempty"`
	Timeout    int64  `protobuf:"varint,5,opt,name=timeout,proto3" json:"timeout,omitempty"`
	MemorySize int64  `protobuf:"varint,6,opt,name=memorySize,proto3" json:"memorySize,omitempty"`
	// contains filtered or unexported fields
}

func (*InitFunctionRequest) Descriptor deprecated

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

Deprecated: Use InitFunctionRequest.ProtoReflect.Descriptor instead.

func (*InitFunctionRequest) GetCodeURI

func (x *InitFunctionRequest) GetCodeURI() string

func (*InitFunctionRequest) GetFuncName

func (x *InitFunctionRequest) GetFuncName() string

func (*InitFunctionRequest) GetImage

func (x *InitFunctionRequest) GetImage() string

func (*InitFunctionRequest) GetMemorySize

func (x *InitFunctionRequest) GetMemorySize() int64

func (*InitFunctionRequest) GetRuntime

func (x *InitFunctionRequest) GetRuntime() string

func (*InitFunctionRequest) GetTimeout

func (x *InitFunctionRequest) GetTimeout() int64

func (*InitFunctionRequest) ProtoMessage

func (*InitFunctionRequest) ProtoMessage()

func (*InitFunctionRequest) ProtoReflect

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

func (*InitFunctionRequest) Reset

func (x *InitFunctionRequest) Reset()

func (*InitFunctionRequest) String

func (x *InitFunctionRequest) String() string

type InitFunctionResponse

type InitFunctionResponse struct {
	Code InitFunctionResponse_Code `protobuf:"varint,1,opt,name=code,proto3,enum=worker.InitFunctionResponse_Code" json:"code,omitempty"`
	Msg  string                    `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*InitFunctionResponse) Descriptor deprecated

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

Deprecated: Use InitFunctionResponse.ProtoReflect.Descriptor instead.

func (*InitFunctionResponse) GetCode

func (*InitFunctionResponse) GetMsg

func (x *InitFunctionResponse) GetMsg() string

func (*InitFunctionResponse) ProtoMessage

func (*InitFunctionResponse) ProtoMessage()

func (*InitFunctionResponse) ProtoReflect

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

func (*InitFunctionResponse) Reset

func (x *InitFunctionResponse) Reset()

func (*InitFunctionResponse) String

func (x *InitFunctionResponse) String() string

type InitFunctionResponse_Code

type InitFunctionResponse_Code int32
const (
	InitFunctionResponse_OK    InitFunctionResponse_Code = 0
	InitFunctionResponse_ERROR InitFunctionResponse_Code = 1
)

func (InitFunctionResponse_Code) Descriptor

func (InitFunctionResponse_Code) Enum

func (InitFunctionResponse_Code) EnumDescriptor deprecated

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

Deprecated: Use InitFunctionResponse_Code.Descriptor instead.

func (InitFunctionResponse_Code) Number

func (InitFunctionResponse_Code) String

func (x InitFunctionResponse_Code) String() string

func (InitFunctionResponse_Code) Type

type InvokeRequest

type InvokeRequest struct {
	Name    string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*InvokeRequest) Descriptor deprecated

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

Deprecated: Use InvokeRequest.ProtoReflect.Descriptor instead.

func (*InvokeRequest) GetName

func (x *InvokeRequest) GetName() string

func (*InvokeRequest) GetPayload

func (x *InvokeRequest) GetPayload() []byte

func (*InvokeRequest) ProtoMessage

func (*InvokeRequest) ProtoMessage()

func (*InvokeRequest) ProtoReflect

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

func (*InvokeRequest) Reset

func (x *InvokeRequest) Reset()

func (*InvokeRequest) String

func (x *InvokeRequest) String() string

type InvokeResponse

type InvokeResponse struct {
	Code   InvokeResponse_Code `protobuf:"varint,1,opt,name=code,proto3,enum=worker.InvokeResponse_Code" json:"code,omitempty"`
	Output []byte              `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"`
	// contains filtered or unexported fields
}

func (*InvokeResponse) Descriptor deprecated

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

Deprecated: Use InvokeResponse.ProtoReflect.Descriptor instead.

func (*InvokeResponse) GetCode

func (x *InvokeResponse) GetCode() InvokeResponse_Code

func (*InvokeResponse) GetOutput

func (x *InvokeResponse) GetOutput() []byte

func (*InvokeResponse) ProtoMessage

func (*InvokeResponse) ProtoMessage()

func (*InvokeResponse) ProtoReflect

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

func (*InvokeResponse) Reset

func (x *InvokeResponse) Reset()

func (*InvokeResponse) String

func (x *InvokeResponse) String() string

type InvokeResponse_Code

type InvokeResponse_Code int32
const (
	InvokeResponse_OK               InvokeResponse_Code = 0
	InvokeResponse_NO_SUCH_FUNCTION InvokeResponse_Code = 1
	InvokeResponse_RUNTIME_ERROR    InvokeResponse_Code = 2
	InvokeResponse_RETRY            InvokeResponse_Code = 3
)

func (InvokeResponse_Code) Descriptor

func (InvokeResponse_Code) Enum

func (InvokeResponse_Code) EnumDescriptor deprecated

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

Deprecated: Use InvokeResponse_Code.Descriptor instead.

func (InvokeResponse_Code) Number

func (InvokeResponse_Code) String

func (x InvokeResponse_Code) String() string

func (InvokeResponse_Code) Type

type MetricsRequest

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

func (*MetricsRequest) Descriptor deprecated

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

Deprecated: Use MetricsRequest.ProtoReflect.Descriptor instead.

func (*MetricsRequest) ProtoMessage

func (*MetricsRequest) ProtoMessage()

func (*MetricsRequest) ProtoReflect

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

func (*MetricsRequest) Reset

func (x *MetricsRequest) Reset()

func (*MetricsRequest) String

func (x *MetricsRequest) String() string

type MetricsResponse

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

func (*MetricsResponse) Descriptor deprecated

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

Deprecated: Use MetricsResponse.ProtoReflect.Descriptor instead.

func (*MetricsResponse) ProtoMessage

func (*MetricsResponse) ProtoMessage()

func (*MetricsResponse) ProtoReflect

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

func (*MetricsResponse) Reset

func (x *MetricsResponse) Reset()

func (*MetricsResponse) String

func (x *MetricsResponse) String() string

type RegisterRequest

type RegisterRequest struct {
	Id       string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Addr     string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
	Runtime  string `protobuf:"bytes,3,opt,name=runtime,proto3" json:"runtime,omitempty"`
	FuncName string `protobuf:"bytes,4,opt,name=funcName,proto3" json:"funcName,omitempty"`
	Memory   int64  `protobuf:"varint,5,opt,name=memory,proto3" json:"memory,omitempty"`
	Disk     int64  `protobuf:"varint,6,opt,name=disk,proto3" json:"disk,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterRequest) Descriptor deprecated

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

Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.

func (*RegisterRequest) GetAddr

func (x *RegisterRequest) GetAddr() string

func (*RegisterRequest) GetDisk

func (x *RegisterRequest) GetDisk() int64

func (*RegisterRequest) GetFuncName

func (x *RegisterRequest) GetFuncName() string

func (*RegisterRequest) GetId

func (x *RegisterRequest) GetId() string

func (*RegisterRequest) GetMemory

func (x *RegisterRequest) GetMemory() int64

func (*RegisterRequest) GetRuntime

func (x *RegisterRequest) GetRuntime() string

func (*RegisterRequest) ProtoMessage

func (*RegisterRequest) ProtoMessage()

func (*RegisterRequest) ProtoReflect

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

func (*RegisterRequest) Reset

func (x *RegisterRequest) Reset()

func (*RegisterRequest) String

func (x *RegisterRequest) String() string

type RegisterResponse

type RegisterResponse struct {
	Code RegisterResponse_Code `protobuf:"varint,1,opt,name=code,proto3,enum=worker.RegisterResponse_Code" json:"code,omitempty"`
	Msg  string                `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterResponse) Descriptor deprecated

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

Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.

func (*RegisterResponse) GetCode

func (*RegisterResponse) GetMsg

func (x *RegisterResponse) GetMsg() string

func (*RegisterResponse) ProtoMessage

func (*RegisterResponse) ProtoMessage()

func (*RegisterResponse) ProtoReflect

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

func (*RegisterResponse) Reset

func (x *RegisterResponse) Reset()

func (*RegisterResponse) String

func (x *RegisterResponse) String() string

type RegisterResponse_Code

type RegisterResponse_Code int32
const (
	RegisterResponse_OK    RegisterResponse_Code = 0
	RegisterResponse_ERROR RegisterResponse_Code = 1
)

func (RegisterResponse_Code) Descriptor

func (RegisterResponse_Code) Enum

func (RegisterResponse_Code) EnumDescriptor deprecated

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

Deprecated: Use RegisterResponse_Code.Descriptor instead.

func (RegisterResponse_Code) Number

func (RegisterResponse_Code) String

func (x RegisterResponse_Code) String() string

func (RegisterResponse_Code) Type

type ResetRequest

type ResetRequest struct {
	Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
	// contains filtered or unexported fields
}

func (*ResetRequest) Descriptor deprecated

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

Deprecated: Use ResetRequest.ProtoReflect.Descriptor instead.

func (*ResetRequest) GetAddr

func (x *ResetRequest) GetAddr() string

func (*ResetRequest) ProtoMessage

func (*ResetRequest) ProtoMessage()

func (*ResetRequest) ProtoReflect

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

func (*ResetRequest) Reset

func (x *ResetRequest) Reset()

func (*ResetRequest) String

func (x *ResetRequest) String() string

type ResetResponse

type ResetResponse struct {
	Code ResetResponse_Code `protobuf:"varint,1,opt,name=code,proto3,enum=worker.ResetResponse_Code" json:"code,omitempty"`
	// contains filtered or unexported fields
}

func (*ResetResponse) Descriptor deprecated

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

Deprecated: Use ResetResponse.ProtoReflect.Descriptor instead.

func (*ResetResponse) GetCode

func (x *ResetResponse) GetCode() ResetResponse_Code

func (*ResetResponse) ProtoMessage

func (*ResetResponse) ProtoMessage()

func (*ResetResponse) ProtoReflect

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

func (*ResetResponse) Reset

func (x *ResetResponse) Reset()

func (*ResetResponse) String

func (x *ResetResponse) String() string

type ResetResponse_Code

type ResetResponse_Code int32
const (
	ResetResponse_OK    ResetResponse_Code = 0
	ResetResponse_ERROR ResetResponse_Code = 1
)

func (ResetResponse_Code) Descriptor

func (ResetResponse_Code) Enum

func (ResetResponse_Code) EnumDescriptor deprecated

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

Deprecated: Use ResetResponse_Code.Descriptor instead.

func (ResetResponse_Code) Number

func (ResetResponse_Code) String

func (x ResetResponse_Code) String() string

func (ResetResponse_Code) Type

type UnimplementedWorkerServer

type UnimplementedWorkerServer struct {
}

UnimplementedWorkerServer can be embedded to have forward compatible implementations.

func (*UnimplementedWorkerServer) InitFunction

func (*UnimplementedWorkerServer) Invoke

func (*UnimplementedWorkerServer) Metrics

func (*UnimplementedWorkerServer) Register

func (*UnimplementedWorkerServer) Reset

type WorkerClient

type WorkerClient interface {
	Invoke(ctx context.Context, in *InvokeRequest, opts ...grpc.CallOption) (*InvokeResponse, error)
	Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error)
	Reset(ctx context.Context, in *ResetRequest, opts ...grpc.CallOption) (*ResetResponse, error)
	InitFunction(ctx context.Context, in *InitFunctionRequest, opts ...grpc.CallOption) (*InitFunctionResponse, error)
	Metrics(ctx context.Context, in *MetricsRequest, opts ...grpc.CallOption) (*MetricsResponse, error)
}

WorkerClient is the client API for Worker service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewWorkerClient

func NewWorkerClient(cc grpc.ClientConnInterface) WorkerClient

type WorkerServer

WorkerServer is the server API for Worker service.

Jump to

Keyboard shortcuts

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