pb

package
v0.0.0-...-a6548e8 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_models_proto protoreflect.FileDescriptor
View Source
var File_proto_orchestrator_proto protoreflect.FileDescriptor
View Source
var Orchestrator_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "github.com.eonias189.calculationService.proto.Orchestrator",
	HandlerType: (*OrchestratorServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Register",
			Handler:    _Orchestrator_Register_Handler,
		},
		{
			MethodName: "Distribute",
			Handler:    _Orchestrator_Distribute_Handler,
		},
		{
			MethodName: "Pong",
			Handler:    _Orchestrator_Pong_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Connect",
			Handler:       _Orchestrator_Connect_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "proto/orchestrator.proto",
}

Orchestrator_ServiceDesc is the grpc.ServiceDesc for Orchestrator service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterOrchestratorServer

func RegisterOrchestratorServer(s grpc.ServiceRegistrar, srv OrchestratorServer)

Types

type Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type OrchestratorClient

type OrchestratorClient interface {
	Register(ctx context.Context, in *RegisterReq, opts ...grpc.CallOption) (*RegisterResp, error)
	Connect(ctx context.Context, opts ...grpc.CallOption) (Orchestrator_ConnectClient, error)
	Distribute(ctx context.Context, in *Task, opts ...grpc.CallOption) (*Empty, error)
	Pong(ctx context.Context, in *PongReq, opts ...grpc.CallOption) (*Empty, error)
}

OrchestratorClient is the client API for Orchestrator 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.

type OrchestratorServer

type OrchestratorServer interface {
	Register(context.Context, *RegisterReq) (*RegisterResp, error)
	Connect(Orchestrator_ConnectServer) error
	Distribute(context.Context, *Task) (*Empty, error)
	Pong(context.Context, *PongReq) (*Empty, error)
	// contains filtered or unexported methods
}

OrchestratorServer is the server API for Orchestrator service. All implementations must embed UnimplementedOrchestratorServer for forward compatibility

type Orchestrator_ConnectClient

type Orchestrator_ConnectClient interface {
	Send(*ResultResp) error
	Recv() (*Task, error)
	grpc.ClientStream
}

type Orchestrator_ConnectServer

type Orchestrator_ConnectServer interface {
	Send(*Task) error
	Recv() (*ResultResp, error)
	grpc.ServerStream
}

type PongReq

type PongReq struct {
	Id       int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	SentTime int64 `protobuf:"varint,2,opt,name=sentTime,proto3" json:"sentTime,omitempty"`
	// contains filtered or unexported fields
}

func (*PongReq) Descriptor deprecated

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

Deprecated: Use PongReq.ProtoReflect.Descriptor instead.

func (*PongReq) GetId

func (x *PongReq) GetId() int64

func (*PongReq) GetSentTime

func (x *PongReq) GetSentTime() int64

func (*PongReq) ProtoMessage

func (*PongReq) ProtoMessage()

func (*PongReq) ProtoReflect

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

func (*PongReq) Reset

func (x *PongReq) Reset()

func (*PongReq) String

func (x *PongReq) String() string

type RegisterReq

type RegisterReq struct {
	MaxThreads int64 `protobuf:"varint,1,opt,name=maxThreads,proto3" json:"maxThreads,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterReq) Descriptor deprecated

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

Deprecated: Use RegisterReq.ProtoReflect.Descriptor instead.

func (*RegisterReq) GetMaxThreads

func (x *RegisterReq) GetMaxThreads() int64

func (*RegisterReq) ProtoMessage

func (*RegisterReq) ProtoMessage()

func (*RegisterReq) ProtoReflect

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

func (*RegisterReq) Reset

func (x *RegisterReq) Reset()

func (*RegisterReq) String

func (x *RegisterReq) String() string

type RegisterResp

type RegisterResp struct {
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterResp) Descriptor deprecated

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

Deprecated: Use RegisterResp.ProtoReflect.Descriptor instead.

func (*RegisterResp) GetId

func (x *RegisterResp) GetId() int64

func (*RegisterResp) ProtoMessage

func (*RegisterResp) ProtoMessage()

func (*RegisterResp) ProtoReflect

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

func (*RegisterResp) Reset

func (x *RegisterResp) Reset()

func (*RegisterResp) String

func (x *RegisterResp) String() string

type ResultResp

type ResultResp struct {
	TaskId         int64   `protobuf:"varint,1,opt,name=taskId,proto3" json:"taskId,omitempty"`
	Result         float64 `protobuf:"fixed64,2,opt,name=result,proto3" json:"result,omitempty"`
	Error          bool    `protobuf:"varint,3,opt,name=error,proto3" json:"error,omitempty"`
	RunningThreads int64   `protobuf:"varint,5,opt,name=runningThreads,proto3" json:"runningThreads,omitempty"`
	// contains filtered or unexported fields
}

func (*ResultResp) Descriptor deprecated

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

Deprecated: Use ResultResp.ProtoReflect.Descriptor instead.

func (*ResultResp) GetError

func (x *ResultResp) GetError() bool

func (*ResultResp) GetResult

func (x *ResultResp) GetResult() float64

func (*ResultResp) GetRunningThreads

func (x *ResultResp) GetRunningThreads() int64

func (*ResultResp) GetTaskId

func (x *ResultResp) GetTaskId() int64

func (*ResultResp) ProtoMessage

func (*ResultResp) ProtoMessage()

func (*ResultResp) ProtoReflect

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

func (*ResultResp) Reset

func (x *ResultResp) Reset()

func (*ResultResp) String

func (x *ResultResp) String() string

type Task

type Task struct {
	Id         int64     `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Expression string    `protobuf:"bytes,2,opt,name=expression,proto3" json:"expression,omitempty"`
	Timeouts   *Timeouts `protobuf:"bytes,3,opt,name=timeouts,proto3" json:"timeouts,omitempty"`
	// contains filtered or unexported fields
}

func (*Task) Descriptor deprecated

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

Deprecated: Use Task.ProtoReflect.Descriptor instead.

func (*Task) GetExpression

func (x *Task) GetExpression() string

func (*Task) GetId

func (x *Task) GetId() int64

func (*Task) GetTimeouts

func (x *Task) GetTimeouts() *Timeouts

func (*Task) ProtoMessage

func (*Task) ProtoMessage()

func (*Task) ProtoReflect

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

func (*Task) Reset

func (x *Task) Reset()

func (*Task) String

func (x *Task) String() string

type Timeouts

type Timeouts struct {
	Add uint64 `protobuf:"varint,1,opt,name=add,proto3" json:"add,omitempty"`
	Sub uint64 `protobuf:"varint,2,opt,name=sub,proto3" json:"sub,omitempty"`
	Mul uint64 `protobuf:"varint,3,opt,name=mul,proto3" json:"mul,omitempty"`
	Div uint64 `protobuf:"varint,4,opt,name=div,proto3" json:"div,omitempty"`
	// contains filtered or unexported fields
}

func (*Timeouts) Descriptor deprecated

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

Deprecated: Use Timeouts.ProtoReflect.Descriptor instead.

func (*Timeouts) GetAdd

func (x *Timeouts) GetAdd() uint64

func (*Timeouts) GetDiv

func (x *Timeouts) GetDiv() uint64

func (*Timeouts) GetMul

func (x *Timeouts) GetMul() uint64

func (*Timeouts) GetSub

func (x *Timeouts) GetSub() uint64

func (*Timeouts) ProtoMessage

func (*Timeouts) ProtoMessage()

func (*Timeouts) ProtoReflect

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

func (*Timeouts) Reset

func (x *Timeouts) Reset()

func (*Timeouts) String

func (x *Timeouts) String() string

type UnimplementedOrchestratorServer

type UnimplementedOrchestratorServer struct {
}

UnimplementedOrchestratorServer must be embedded to have forward compatible implementations.

func (UnimplementedOrchestratorServer) Connect

func (UnimplementedOrchestratorServer) Distribute

func (UnimplementedOrchestratorServer) Pong

func (UnimplementedOrchestratorServer) Register

type UnsafeOrchestratorServer

type UnsafeOrchestratorServer interface {
	// contains filtered or unexported methods
}

UnsafeOrchestratorServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OrchestratorServer will result in compilation errors.

Jump to

Keyboard shortcuts

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