grpc

package
v0.0.0-...-b77fa13 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_internal_grpc_messenger_proto protoreflect.FileDescriptor

Functions

func RegisterMasterServer

func RegisterMasterServer(s grpc.ServiceRegistrar, srv MasterServer)

func RegisterProgramServer

func RegisterProgramServer(s grpc.ServiceRegistrar, srv ProgramServer)

func RegisterStackServer

func RegisterStackServer(s grpc.ServiceRegistrar, srv StackServer)

Types

type LoadMessage

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

func (*LoadMessage) Descriptor deprecated

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

Deprecated: Use LoadMessage.ProtoReflect.Descriptor instead.

func (*LoadMessage) GetProgram

func (x *LoadMessage) GetProgram() string

func (*LoadMessage) ProtoMessage

func (*LoadMessage) ProtoMessage()

func (*LoadMessage) ProtoReflect

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

func (*LoadMessage) Reset

func (x *LoadMessage) Reset()

func (*LoadMessage) String

func (x *LoadMessage) String() string

type MasterClient

type MasterClient interface {
	GetInput(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ValueMessage, error)
	SendOutput(ctx context.Context, in *ValueMessage, opts ...grpc.CallOption) (*empty.Empty, error)
}

MasterClient is the client API for Master 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 NewMasterClient

func NewMasterClient(cc grpc.ClientConnInterface) MasterClient

type MasterServer

type MasterServer interface {
	GetInput(context.Context, *empty.Empty) (*ValueMessage, error)
	SendOutput(context.Context, *ValueMessage) (*empty.Empty, error)
	// contains filtered or unexported methods
}

MasterServer is the server API for Master service. All implementations must embed UnimplementedMasterServer for forward compatibility

type ProgramClient

type ProgramClient interface {
	Run(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
	Pause(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
	Reset(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
	Load(ctx context.Context, in *LoadMessage, opts ...grpc.CallOption) (*empty.Empty, error)
	Send(ctx context.Context, in *SendMessage, opts ...grpc.CallOption) (*empty.Empty, error)
}

ProgramClient is the client API for Program 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 NewProgramClient

func NewProgramClient(cc grpc.ClientConnInterface) ProgramClient

type ProgramServer

type ProgramServer interface {
	Run(context.Context, *empty.Empty) (*empty.Empty, error)
	Pause(context.Context, *empty.Empty) (*empty.Empty, error)
	Reset(context.Context, *empty.Empty) (*empty.Empty, error)
	Load(context.Context, *LoadMessage) (*empty.Empty, error)
	Send(context.Context, *SendMessage) (*empty.Empty, error)
	// contains filtered or unexported methods
}

ProgramServer is the server API for Program service. All implementations must embed UnimplementedProgramServer for forward compatibility

type SendMessage

type SendMessage struct {
	Value    int32 `protobuf:"zigzag32,1,opt,name=value,proto3" json:"value,omitempty"`
	Register int32 `protobuf:"varint,2,opt,name=register,proto3" json:"register,omitempty"`
	// contains filtered or unexported fields
}

func (*SendMessage) Descriptor deprecated

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

Deprecated: Use SendMessage.ProtoReflect.Descriptor instead.

func (*SendMessage) GetRegister

func (x *SendMessage) GetRegister() int32

func (*SendMessage) GetValue

func (x *SendMessage) GetValue() int32

func (*SendMessage) ProtoMessage

func (*SendMessage) ProtoMessage()

func (*SendMessage) ProtoReflect

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

func (*SendMessage) Reset

func (x *SendMessage) Reset()

func (*SendMessage) String

func (x *SendMessage) String() string

type StackClient

type StackClient interface {
	Run(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
	Pause(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
	Reset(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
	Push(ctx context.Context, in *ValueMessage, opts ...grpc.CallOption) (*empty.Empty, error)
	Pop(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ValueMessage, error)
}

StackClient is the client API for Stack 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 NewStackClient

func NewStackClient(cc grpc.ClientConnInterface) StackClient

type StackServer

type StackServer interface {
	Run(context.Context, *empty.Empty) (*empty.Empty, error)
	Pause(context.Context, *empty.Empty) (*empty.Empty, error)
	Reset(context.Context, *empty.Empty) (*empty.Empty, error)
	Push(context.Context, *ValueMessage) (*empty.Empty, error)
	Pop(context.Context, *empty.Empty) (*ValueMessage, error)
	// contains filtered or unexported methods
}

StackServer is the server API for Stack service. All implementations must embed UnimplementedStackServer for forward compatibility

type UnimplementedMasterServer

type UnimplementedMasterServer struct {
}

UnimplementedMasterServer must be embedded to have forward compatible implementations.

func (UnimplementedMasterServer) GetInput

func (UnimplementedMasterServer) SendOutput

type UnimplementedProgramServer

type UnimplementedProgramServer struct {
}

UnimplementedProgramServer must be embedded to have forward compatible implementations.

func (UnimplementedProgramServer) Load

func (UnimplementedProgramServer) Pause

func (UnimplementedProgramServer) Reset

func (UnimplementedProgramServer) Run

func (UnimplementedProgramServer) Send

type UnimplementedStackServer

type UnimplementedStackServer struct {
}

UnimplementedStackServer must be embedded to have forward compatible implementations.

func (UnimplementedStackServer) Pause

func (UnimplementedStackServer) Pop

func (UnimplementedStackServer) Push

func (UnimplementedStackServer) Reset

func (UnimplementedStackServer) Run

type UnsafeMasterServer

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

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

type UnsafeProgramServer

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

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

type UnsafeStackServer

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

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

type ValueMessage

type ValueMessage struct {
	Value int32 `protobuf:"zigzag32,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*ValueMessage) Descriptor deprecated

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

Deprecated: Use ValueMessage.ProtoReflect.Descriptor instead.

func (*ValueMessage) GetValue

func (x *ValueMessage) GetValue() int32

func (*ValueMessage) ProtoMessage

func (*ValueMessage) ProtoMessage()

func (*ValueMessage) ProtoReflect

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

func (*ValueMessage) Reset

func (x *ValueMessage) Reset()

func (*ValueMessage) String

func (x *ValueMessage) String() string

Jump to

Keyboard shortcuts

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