Documentation ¶
Index ¶
- Variables
- func GetHelloKind(opts ...actor.PropsOption) *cluster.Kind
- func GetWorkKind(opts ...actor.PropsOption) *cluster.Kind
- func HelloFactory(factory func() Hello)
- func NewHelloKind(factory func() Hello, timeout time.Duration, opts ...actor.PropsOption) *cluster.Kind
- func NewWorkKind(factory func() Work, timeout time.Duration, opts ...actor.PropsOption) *cluster.Kind
- func WorkFactory(factory func() Work)
- type DoWorkRequest
- type DoWorkResponse
- type Hello
- type HelloActor
- type HelloGrainClient
- type SayHelloResponse
- type Work
- type WorkActor
- type WorkGrainClient
Constants ¶
This section is empty.
Variables ¶
var File_test_multi_services_services_proto protoreflect.FileDescriptor
Functions ¶
func GetHelloKind ¶
func GetHelloKind(opts ...actor.PropsOption) *cluster.Kind
GetHelloKind instantiates a new cluster.Kind for Hello
func GetWorkKind ¶
func GetWorkKind(opts ...actor.PropsOption) *cluster.Kind
GetWorkKind instantiates a new cluster.Kind for Work
func NewHelloKind ¶
func NewHelloKind(factory func() Hello, timeout time.Duration, opts ...actor.PropsOption) *cluster.Kind
GetHelloKind instantiates a new cluster.Kind for Hello
func NewWorkKind ¶
func NewWorkKind(factory func() Work, timeout time.Duration, opts ...actor.PropsOption) *cluster.Kind
GetWorkKind instantiates a new cluster.Kind for Work
Types ¶
type DoWorkRequest ¶
type DoWorkRequest struct { Work string `protobuf:"bytes,1,opt,name=work,proto3" json:"work,omitempty"` // contains filtered or unexported fields }
func (*DoWorkRequest) Descriptor
deprecated
func (*DoWorkRequest) Descriptor() ([]byte, []int)
Deprecated: Use DoWorkRequest.ProtoReflect.Descriptor instead.
func (*DoWorkRequest) GetWork ¶
func (x *DoWorkRequest) GetWork() string
func (*DoWorkRequest) ProtoMessage ¶
func (*DoWorkRequest) ProtoMessage()
func (*DoWorkRequest) ProtoReflect ¶
func (x *DoWorkRequest) ProtoReflect() protoreflect.Message
func (*DoWorkRequest) Reset ¶
func (x *DoWorkRequest) Reset()
func (*DoWorkRequest) String ¶
func (x *DoWorkRequest) String() string
type DoWorkResponse ¶
type DoWorkResponse struct { Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
func (*DoWorkResponse) Descriptor
deprecated
func (*DoWorkResponse) Descriptor() ([]byte, []int)
Deprecated: Use DoWorkResponse.ProtoReflect.Descriptor instead.
func (*DoWorkResponse) GetResult ¶
func (x *DoWorkResponse) GetResult() string
func (*DoWorkResponse) ProtoMessage ¶
func (*DoWorkResponse) ProtoMessage()
func (*DoWorkResponse) ProtoReflect ¶
func (x *DoWorkResponse) ProtoReflect() protoreflect.Message
func (*DoWorkResponse) Reset ¶
func (x *DoWorkResponse) Reset()
func (*DoWorkResponse) String ¶
func (x *DoWorkResponse) String() string
type Hello ¶
type Hello interface { Init(ctx cluster.GrainContext) Terminate(ctx cluster.GrainContext) ReceiveDefault(ctx cluster.GrainContext) SayHello(req *emptypb.Empty, ctx cluster.GrainContext) (*SayHelloResponse, error) }
Hello interfaces the services available to the Hello
type HelloActor ¶
HelloActor represents the actor structure
func (*HelloActor) Receive ¶
func (a *HelloActor) Receive(ctx actor.Context)
Receive ensures the lifecycle of the actor for the received message
type HelloGrainClient ¶
type HelloGrainClient struct { Identity string // contains filtered or unexported fields }
HelloGrainClient holds the base data for the HelloGrain
func GetHelloGrainClient ¶
func GetHelloGrainClient(c *cluster.Cluster, id string) *HelloGrainClient
GetHelloGrainClient instantiates a new HelloGrainClient with given Identity
func (*HelloGrainClient) SayHello ¶
func (g *HelloGrainClient) SayHello(r *emptypb.Empty, opts ...cluster.GrainCallOption) (*SayHelloResponse, error)
SayHello requests the execution on to the cluster with CallOptions
type SayHelloResponse ¶
type SayHelloResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*SayHelloResponse) Descriptor
deprecated
func (*SayHelloResponse) Descriptor() ([]byte, []int)
Deprecated: Use SayHelloResponse.ProtoReflect.Descriptor instead.
func (*SayHelloResponse) GetMessage ¶
func (x *SayHelloResponse) GetMessage() string
func (*SayHelloResponse) ProtoMessage ¶
func (*SayHelloResponse) ProtoMessage()
func (*SayHelloResponse) ProtoReflect ¶
func (x *SayHelloResponse) ProtoReflect() protoreflect.Message
func (*SayHelloResponse) Reset ¶
func (x *SayHelloResponse) Reset()
func (*SayHelloResponse) String ¶
func (x *SayHelloResponse) String() string
type Work ¶
type Work interface { Init(ctx cluster.GrainContext) Terminate(ctx cluster.GrainContext) ReceiveDefault(ctx cluster.GrainContext) DoWork(req *DoWorkRequest, ctx cluster.GrainContext) (*DoWorkResponse, error) }
Work interfaces the services available to the Work
type WorkGrainClient ¶
type WorkGrainClient struct { Identity string // contains filtered or unexported fields }
WorkGrainClient holds the base data for the WorkGrain
func GetWorkGrainClient ¶
func GetWorkGrainClient(c *cluster.Cluster, id string) *WorkGrainClient
GetWorkGrainClient instantiates a new WorkGrainClient with given Identity
func (*WorkGrainClient) DoWork ¶
func (g *WorkGrainClient) DoWork(r *DoWorkRequest, opts ...cluster.GrainCallOption) (*DoWorkResponse, error)
DoWork requests the execution on to the cluster with CallOptions