Documentation ¶
Index ¶
- Variables
- func CalculatorFactory(factory func() Calculator)
- func RegisterCalculatorServer(s *grpc.Server, srv CalculatorServer)
- func RegisterTrackerServer(s *grpc.Server, srv TrackerServer)
- func TrackerFactory(factory func() Tracker)
- type CalcGrain
- func (c *CalcGrain) Add(n *NumberRequest, ctx cluster.GrainContext) (*CountResponse, error)
- func (c *CalcGrain) GetCurrent(n *Noop, ctx cluster.GrainContext) (*CountResponse, error)
- func (c *CalcGrain) Init(id string)
- func (c *CalcGrain) Subtract(n *NumberRequest, ctx cluster.GrainContext) (*CountResponse, error)
- func (c *CalcGrain) Terminate()
- type Calculator
- type CalculatorActor
- type CalculatorClient
- type CalculatorGrain
- func (g *CalculatorGrain) Add(r *NumberRequest) (*CountResponse, error)
- func (g *CalculatorGrain) AddChan(r *NumberRequest) (<-chan *CountResponse, <-chan error)
- func (g *CalculatorGrain) AddChanWithOpts(r *NumberRequest, opts *cluster.GrainCallOptions) (<-chan *CountResponse, <-chan error)
- func (g *CalculatorGrain) AddWithOpts(r *NumberRequest, opts *cluster.GrainCallOptions) (*CountResponse, error)
- func (g *CalculatorGrain) GetCurrent(r *Noop) (*CountResponse, error)
- func (g *CalculatorGrain) GetCurrentChan(r *Noop) (<-chan *CountResponse, <-chan error)
- func (g *CalculatorGrain) GetCurrentChanWithOpts(r *Noop, opts *cluster.GrainCallOptions) (<-chan *CountResponse, <-chan error)
- func (g *CalculatorGrain) GetCurrentWithOpts(r *Noop, opts *cluster.GrainCallOptions) (*CountResponse, error)
- func (g *CalculatorGrain) Subtract(r *NumberRequest) (*CountResponse, error)
- func (g *CalculatorGrain) SubtractChan(r *NumberRequest) (<-chan *CountResponse, <-chan error)
- func (g *CalculatorGrain) SubtractChanWithOpts(r *NumberRequest, opts *cluster.GrainCallOptions) (<-chan *CountResponse, <-chan error)
- func (g *CalculatorGrain) SubtractWithOpts(r *NumberRequest, opts *cluster.GrainCallOptions) (*CountResponse, error)
- type CalculatorServer
- type CountResponse
- func (*CountResponse) Descriptor() ([]byte, []int)
- func (this *CountResponse) Equal(that interface{}) bool
- func (m *CountResponse) GetNumber() int64
- func (this *CountResponse) GoString() string
- func (m *CountResponse) Marshal() (dAtA []byte, err error)
- func (m *CountResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *CountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CountResponse) ProtoMessage()
- func (m *CountResponse) Reset()
- func (m *CountResponse) Size() (n int)
- func (this *CountResponse) String() string
- func (m *CountResponse) Unmarshal(dAtA []byte) error
- func (m *CountResponse) XXX_DiscardUnknown()
- func (m *CountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CountResponse) XXX_Merge(src proto.Message)
- func (m *CountResponse) XXX_Size() int
- func (m *CountResponse) XXX_Unmarshal(b []byte) error
- type Noop
- func (*Noop) Descriptor() ([]byte, []int)
- func (this *Noop) Equal(that interface{}) bool
- func (this *Noop) GoString() string
- func (m *Noop) Marshal() (dAtA []byte, err error)
- func (m *Noop) MarshalTo(dAtA []byte) (int, error)
- func (m *Noop) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Noop) ProtoMessage()
- func (m *Noop) Reset()
- func (m *Noop) Size() (n int)
- func (this *Noop) String() string
- func (m *Noop) Unmarshal(dAtA []byte) error
- func (m *Noop) XXX_DiscardUnknown()
- func (m *Noop) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Noop) XXX_Merge(src proto.Message)
- func (m *Noop) XXX_Size() int
- func (m *Noop) XXX_Unmarshal(b []byte) error
- type NumberRequest
- func (*NumberRequest) Descriptor() ([]byte, []int)
- func (this *NumberRequest) Equal(that interface{}) bool
- func (m *NumberRequest) GetNumber() int64
- func (this *NumberRequest) GoString() string
- func (m *NumberRequest) Marshal() (dAtA []byte, err error)
- func (m *NumberRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *NumberRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*NumberRequest) ProtoMessage()
- func (m *NumberRequest) Reset()
- func (m *NumberRequest) Size() (n int)
- func (this *NumberRequest) String() string
- func (m *NumberRequest) Unmarshal(dAtA []byte) error
- func (m *NumberRequest) XXX_DiscardUnknown()
- func (m *NumberRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NumberRequest) XXX_Merge(src proto.Message)
- func (m *NumberRequest) XXX_Size() int
- func (m *NumberRequest) XXX_Unmarshal(b []byte) error
- type RegisterMessage
- func (*RegisterMessage) Descriptor() ([]byte, []int)
- func (this *RegisterMessage) Equal(that interface{}) bool
- func (m *RegisterMessage) GetGrainId() string
- func (this *RegisterMessage) GoString() string
- func (m *RegisterMessage) Marshal() (dAtA []byte, err error)
- func (m *RegisterMessage) MarshalTo(dAtA []byte) (int, error)
- func (m *RegisterMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RegisterMessage) ProtoMessage()
- func (m *RegisterMessage) Reset()
- func (m *RegisterMessage) Size() (n int)
- func (this *RegisterMessage) String() string
- func (m *RegisterMessage) Unmarshal(dAtA []byte) error
- func (m *RegisterMessage) XXX_DiscardUnknown()
- func (m *RegisterMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RegisterMessage) XXX_Merge(src proto.Message)
- func (m *RegisterMessage) XXX_Size() int
- func (m *RegisterMessage) XXX_Unmarshal(b []byte) error
- type TotalsResponse
- func (*TotalsResponse) Descriptor() ([]byte, []int)
- func (this *TotalsResponse) Equal(that interface{}) bool
- func (m *TotalsResponse) GetTotals() map[string]int64
- func (this *TotalsResponse) GoString() string
- func (m *TotalsResponse) Marshal() (dAtA []byte, err error)
- func (m *TotalsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *TotalsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TotalsResponse) ProtoMessage()
- func (m *TotalsResponse) Reset()
- func (m *TotalsResponse) Size() (n int)
- func (this *TotalsResponse) String() string
- func (m *TotalsResponse) Unmarshal(dAtA []byte) error
- func (m *TotalsResponse) XXX_DiscardUnknown()
- func (m *TotalsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TotalsResponse) XXX_Merge(src proto.Message)
- func (m *TotalsResponse) XXX_Size() int
- func (m *TotalsResponse) XXX_Unmarshal(b []byte) error
- type TrackGrain
- func (t *TrackGrain) BroadcastGetCounts(n *Noop, ctx cluster.GrainContext) (*TotalsResponse, error)
- func (t *TrackGrain) DeregisterGrain(n *RegisterMessage, ctx cluster.GrainContext) (*Noop, error)
- func (t *TrackGrain) Init(id string)
- func (t *TrackGrain) RegisterGrain(n *RegisterMessage, ctx cluster.GrainContext) (*Noop, error)
- func (t *TrackGrain) Terminate()
- type Tracker
- type TrackerActor
- type TrackerClient
- type TrackerGrain
- func (g *TrackerGrain) BroadcastGetCounts(r *Noop) (*TotalsResponse, error)
- func (g *TrackerGrain) BroadcastGetCountsChan(r *Noop) (<-chan *TotalsResponse, <-chan error)
- func (g *TrackerGrain) BroadcastGetCountsChanWithOpts(r *Noop, opts *cluster.GrainCallOptions) (<-chan *TotalsResponse, <-chan error)
- func (g *TrackerGrain) BroadcastGetCountsWithOpts(r *Noop, opts *cluster.GrainCallOptions) (*TotalsResponse, error)
- func (g *TrackerGrain) DeregisterGrain(r *RegisterMessage) (*Noop, error)
- func (g *TrackerGrain) DeregisterGrainChan(r *RegisterMessage) (<-chan *Noop, <-chan error)
- func (g *TrackerGrain) DeregisterGrainChanWithOpts(r *RegisterMessage, opts *cluster.GrainCallOptions) (<-chan *Noop, <-chan error)
- func (g *TrackerGrain) DeregisterGrainWithOpts(r *RegisterMessage, opts *cluster.GrainCallOptions) (*Noop, error)
- func (g *TrackerGrain) RegisterGrain(r *RegisterMessage) (*Noop, error)
- func (g *TrackerGrain) RegisterGrainChan(r *RegisterMessage) (<-chan *Noop, <-chan error)
- func (g *TrackerGrain) RegisterGrainChanWithOpts(r *RegisterMessage, opts *cluster.GrainCallOptions) (<-chan *Noop, <-chan error)
- func (g *TrackerGrain) RegisterGrainWithOpts(r *RegisterMessage, opts *cluster.GrainCallOptions) (*Noop, error)
- type TrackerServer
- type UnimplementedCalculatorServer
- func (*UnimplementedCalculatorServer) Add(ctx context.Context, req *NumberRequest) (*CountResponse, error)
- func (*UnimplementedCalculatorServer) GetCurrent(ctx context.Context, req *Noop) (*CountResponse, error)
- func (*UnimplementedCalculatorServer) Subtract(ctx context.Context, req *NumberRequest) (*CountResponse, error)
- type UnimplementedTrackerServer
- func (*UnimplementedTrackerServer) BroadcastGetCounts(ctx context.Context, req *Noop) (*TotalsResponse, error)
- func (*UnimplementedTrackerServer) DeregisterGrain(ctx context.Context, req *RegisterMessage) (*Noop, error)
- func (*UnimplementedTrackerServer) RegisterGrain(ctx context.Context, req *RegisterMessage) (*Noop, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CalculatorFactory ¶
func CalculatorFactory(factory func() Calculator)
CalculatorFactory produces a Calculator
func RegisterCalculatorServer ¶
func RegisterCalculatorServer(s *grpc.Server, srv CalculatorServer)
func RegisterTrackerServer ¶
func RegisterTrackerServer(s *grpc.Server, srv TrackerServer)
Types ¶
type CalcGrain ¶
func (*CalcGrain) Add ¶
func (c *CalcGrain) Add(n *NumberRequest, ctx cluster.GrainContext) (*CountResponse, error)
func (*CalcGrain) GetCurrent ¶
func (c *CalcGrain) GetCurrent(n *Noop, ctx cluster.GrainContext) (*CountResponse, error)
func (*CalcGrain) Subtract ¶
func (c *CalcGrain) Subtract(n *NumberRequest, ctx cluster.GrainContext) (*CountResponse, error)
type Calculator ¶
type Calculator interface { Init(id string) Terminate() Add(*NumberRequest, cluster.GrainContext) (*CountResponse, error) Subtract(*NumberRequest, cluster.GrainContext) (*CountResponse, error) GetCurrent(*Noop, cluster.GrainContext) (*CountResponse, error) }
Calculator interfaces the services available to the Calculator
type CalculatorActor ¶
CalculatorActor represents the actor structure
func (*CalculatorActor) Receive ¶
func (a *CalculatorActor) Receive(ctx actor.Context)
Receive ensures the lifecycle of the actor for the received message
type CalculatorClient ¶
type CalculatorClient interface { Add(ctx context.Context, in *NumberRequest, opts ...grpc.CallOption) (*CountResponse, error) Subtract(ctx context.Context, in *NumberRequest, opts ...grpc.CallOption) (*CountResponse, error) GetCurrent(ctx context.Context, in *Noop, opts ...grpc.CallOption) (*CountResponse, error) }
CalculatorClient is the client API for Calculator service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewCalculatorClient ¶
func NewCalculatorClient(cc *grpc.ClientConn) CalculatorClient
type CalculatorGrain ¶
type CalculatorGrain struct {
ID string
}
CalculatorGrain holds the base data for the CalculatorGrain
func GetCalculatorGrain ¶
func GetCalculatorGrain(id string) *CalculatorGrain
GetCalculatorGrain instantiates a new CalculatorGrain with given ID
func (*CalculatorGrain) Add ¶
func (g *CalculatorGrain) Add(r *NumberRequest) (*CountResponse, error)
Add requests the execution on to the cluster using default options
func (*CalculatorGrain) AddChan ¶
func (g *CalculatorGrain) AddChan(r *NumberRequest) (<-chan *CountResponse, <-chan error)
AddChan allows to use a channel to execute the method using default options
func (*CalculatorGrain) AddChanWithOpts ¶
func (g *CalculatorGrain) AddChanWithOpts(r *NumberRequest, opts *cluster.GrainCallOptions) (<-chan *CountResponse, <-chan error)
AddChanWithOpts allows to use a channel to execute the method
func (*CalculatorGrain) AddWithOpts ¶
func (g *CalculatorGrain) AddWithOpts(r *NumberRequest, opts *cluster.GrainCallOptions) (*CountResponse, error)
AddWithOpts requests the execution on to the cluster
func (*CalculatorGrain) GetCurrent ¶
func (g *CalculatorGrain) GetCurrent(r *Noop) (*CountResponse, error)
GetCurrent requests the execution on to the cluster using default options
func (*CalculatorGrain) GetCurrentChan ¶
func (g *CalculatorGrain) GetCurrentChan(r *Noop) (<-chan *CountResponse, <-chan error)
GetCurrentChan allows to use a channel to execute the method using default options
func (*CalculatorGrain) GetCurrentChanWithOpts ¶
func (g *CalculatorGrain) GetCurrentChanWithOpts(r *Noop, opts *cluster.GrainCallOptions) (<-chan *CountResponse, <-chan error)
GetCurrentChanWithOpts allows to use a channel to execute the method
func (*CalculatorGrain) GetCurrentWithOpts ¶
func (g *CalculatorGrain) GetCurrentWithOpts(r *Noop, opts *cluster.GrainCallOptions) (*CountResponse, error)
GetCurrentWithOpts requests the execution on to the cluster
func (*CalculatorGrain) Subtract ¶
func (g *CalculatorGrain) Subtract(r *NumberRequest) (*CountResponse, error)
Subtract requests the execution on to the cluster using default options
func (*CalculatorGrain) SubtractChan ¶
func (g *CalculatorGrain) SubtractChan(r *NumberRequest) (<-chan *CountResponse, <-chan error)
SubtractChan allows to use a channel to execute the method using default options
func (*CalculatorGrain) SubtractChanWithOpts ¶
func (g *CalculatorGrain) SubtractChanWithOpts(r *NumberRequest, opts *cluster.GrainCallOptions) (<-chan *CountResponse, <-chan error)
SubtractChanWithOpts allows to use a channel to execute the method
func (*CalculatorGrain) SubtractWithOpts ¶
func (g *CalculatorGrain) SubtractWithOpts(r *NumberRequest, opts *cluster.GrainCallOptions) (*CountResponse, error)
SubtractWithOpts requests the execution on to the cluster
type CalculatorServer ¶
type CalculatorServer interface { Add(context.Context, *NumberRequest) (*CountResponse, error) Subtract(context.Context, *NumberRequest) (*CountResponse, error) GetCurrent(context.Context, *Noop) (*CountResponse, error) }
CalculatorServer is the server API for Calculator service.
type CountResponse ¶
type CountResponse struct {
Number int64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`
}
func (*CountResponse) Descriptor ¶
func (*CountResponse) Descriptor() ([]byte, []int)
func (*CountResponse) Equal ¶
func (this *CountResponse) Equal(that interface{}) bool
func (*CountResponse) GetNumber ¶
func (m *CountResponse) GetNumber() int64
func (*CountResponse) GoString ¶
func (this *CountResponse) GoString() string
func (*CountResponse) Marshal ¶
func (m *CountResponse) Marshal() (dAtA []byte, err error)
func (*CountResponse) MarshalToSizedBuffer ¶
func (m *CountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CountResponse) ProtoMessage ¶
func (*CountResponse) ProtoMessage()
func (*CountResponse) Reset ¶
func (m *CountResponse) Reset()
func (*CountResponse) Size ¶
func (m *CountResponse) Size() (n int)
func (*CountResponse) String ¶
func (this *CountResponse) String() string
func (*CountResponse) Unmarshal ¶
func (m *CountResponse) Unmarshal(dAtA []byte) error
func (*CountResponse) XXX_DiscardUnknown ¶
func (m *CountResponse) XXX_DiscardUnknown()
func (*CountResponse) XXX_Marshal ¶
func (m *CountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CountResponse) XXX_Merge ¶
func (m *CountResponse) XXX_Merge(src proto.Message)
func (*CountResponse) XXX_Size ¶
func (m *CountResponse) XXX_Size() int
func (*CountResponse) XXX_Unmarshal ¶
func (m *CountResponse) XXX_Unmarshal(b []byte) error
type Noop ¶
type Noop struct { }
func (*Noop) Descriptor ¶
func (*Noop) ProtoMessage ¶
func (*Noop) ProtoMessage()
func (*Noop) XXX_DiscardUnknown ¶
func (m *Noop) XXX_DiscardUnknown()
func (*Noop) XXX_Unmarshal ¶
type NumberRequest ¶
type NumberRequest struct {
Number int64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`
}
func (*NumberRequest) Descriptor ¶
func (*NumberRequest) Descriptor() ([]byte, []int)
func (*NumberRequest) Equal ¶
func (this *NumberRequest) Equal(that interface{}) bool
func (*NumberRequest) GetNumber ¶
func (m *NumberRequest) GetNumber() int64
func (*NumberRequest) GoString ¶
func (this *NumberRequest) GoString() string
func (*NumberRequest) Marshal ¶
func (m *NumberRequest) Marshal() (dAtA []byte, err error)
func (*NumberRequest) MarshalToSizedBuffer ¶
func (m *NumberRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*NumberRequest) ProtoMessage ¶
func (*NumberRequest) ProtoMessage()
func (*NumberRequest) Reset ¶
func (m *NumberRequest) Reset()
func (*NumberRequest) Size ¶
func (m *NumberRequest) Size() (n int)
func (*NumberRequest) String ¶
func (this *NumberRequest) String() string
func (*NumberRequest) Unmarshal ¶
func (m *NumberRequest) Unmarshal(dAtA []byte) error
func (*NumberRequest) XXX_DiscardUnknown ¶
func (m *NumberRequest) XXX_DiscardUnknown()
func (*NumberRequest) XXX_Marshal ¶
func (m *NumberRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*NumberRequest) XXX_Merge ¶
func (m *NumberRequest) XXX_Merge(src proto.Message)
func (*NumberRequest) XXX_Size ¶
func (m *NumberRequest) XXX_Size() int
func (*NumberRequest) XXX_Unmarshal ¶
func (m *NumberRequest) XXX_Unmarshal(b []byte) error
type RegisterMessage ¶
type RegisterMessage struct {
GrainId string `protobuf:"bytes,1,opt,name=grain_id,json=grainId,proto3" json:"grain_id,omitempty"`
}
func (*RegisterMessage) Descriptor ¶
func (*RegisterMessage) Descriptor() ([]byte, []int)
func (*RegisterMessage) Equal ¶
func (this *RegisterMessage) Equal(that interface{}) bool
func (*RegisterMessage) GetGrainId ¶
func (m *RegisterMessage) GetGrainId() string
func (*RegisterMessage) GoString ¶
func (this *RegisterMessage) GoString() string
func (*RegisterMessage) Marshal ¶
func (m *RegisterMessage) Marshal() (dAtA []byte, err error)
func (*RegisterMessage) MarshalToSizedBuffer ¶
func (m *RegisterMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*RegisterMessage) ProtoMessage ¶
func (*RegisterMessage) ProtoMessage()
func (*RegisterMessage) Reset ¶
func (m *RegisterMessage) Reset()
func (*RegisterMessage) Size ¶
func (m *RegisterMessage) Size() (n int)
func (*RegisterMessage) String ¶
func (this *RegisterMessage) String() string
func (*RegisterMessage) Unmarshal ¶
func (m *RegisterMessage) Unmarshal(dAtA []byte) error
func (*RegisterMessage) XXX_DiscardUnknown ¶
func (m *RegisterMessage) XXX_DiscardUnknown()
func (*RegisterMessage) XXX_Marshal ¶
func (m *RegisterMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RegisterMessage) XXX_Merge ¶
func (m *RegisterMessage) XXX_Merge(src proto.Message)
func (*RegisterMessage) XXX_Size ¶
func (m *RegisterMessage) XXX_Size() int
func (*RegisterMessage) XXX_Unmarshal ¶
func (m *RegisterMessage) XXX_Unmarshal(b []byte) error
type TotalsResponse ¶
type TotalsResponse struct {
Totals map[string]int64 `` /* 154-byte string literal not displayed */
}
func (*TotalsResponse) Descriptor ¶
func (*TotalsResponse) Descriptor() ([]byte, []int)
func (*TotalsResponse) Equal ¶
func (this *TotalsResponse) Equal(that interface{}) bool
func (*TotalsResponse) GetTotals ¶
func (m *TotalsResponse) GetTotals() map[string]int64
func (*TotalsResponse) GoString ¶
func (this *TotalsResponse) GoString() string
func (*TotalsResponse) Marshal ¶
func (m *TotalsResponse) Marshal() (dAtA []byte, err error)
func (*TotalsResponse) MarshalToSizedBuffer ¶
func (m *TotalsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TotalsResponse) ProtoMessage ¶
func (*TotalsResponse) ProtoMessage()
func (*TotalsResponse) Reset ¶
func (m *TotalsResponse) Reset()
func (*TotalsResponse) Size ¶
func (m *TotalsResponse) Size() (n int)
func (*TotalsResponse) String ¶
func (this *TotalsResponse) String() string
func (*TotalsResponse) Unmarshal ¶
func (m *TotalsResponse) Unmarshal(dAtA []byte) error
func (*TotalsResponse) XXX_DiscardUnknown ¶
func (m *TotalsResponse) XXX_DiscardUnknown()
func (*TotalsResponse) XXX_Marshal ¶
func (m *TotalsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TotalsResponse) XXX_Merge ¶
func (m *TotalsResponse) XXX_Merge(src proto.Message)
func (*TotalsResponse) XXX_Size ¶
func (m *TotalsResponse) XXX_Size() int
func (*TotalsResponse) XXX_Unmarshal ¶
func (m *TotalsResponse) XXX_Unmarshal(b []byte) error
type TrackGrain ¶
func (*TrackGrain) BroadcastGetCounts ¶
func (t *TrackGrain) BroadcastGetCounts(n *Noop, ctx cluster.GrainContext) (*TotalsResponse, error)
func (*TrackGrain) DeregisterGrain ¶
func (t *TrackGrain) DeregisterGrain(n *RegisterMessage, ctx cluster.GrainContext) (*Noop, error)
func (*TrackGrain) Init ¶
func (t *TrackGrain) Init(id string)
func (*TrackGrain) RegisterGrain ¶
func (t *TrackGrain) RegisterGrain(n *RegisterMessage, ctx cluster.GrainContext) (*Noop, error)
func (*TrackGrain) Terminate ¶
func (t *TrackGrain) Terminate()
type Tracker ¶
type Tracker interface { Init(id string) Terminate() RegisterGrain(*RegisterMessage, cluster.GrainContext) (*Noop, error) DeregisterGrain(*RegisterMessage, cluster.GrainContext) (*Noop, error) BroadcastGetCounts(*Noop, cluster.GrainContext) (*TotalsResponse, error) }
Tracker interfaces the services available to the Tracker
type TrackerActor ¶
TrackerActor represents the actor structure
func (*TrackerActor) Receive ¶
func (a *TrackerActor) Receive(ctx actor.Context)
Receive ensures the lifecycle of the actor for the received message
type TrackerClient ¶
type TrackerClient interface { RegisterGrain(ctx context.Context, in *RegisterMessage, opts ...grpc.CallOption) (*Noop, error) DeregisterGrain(ctx context.Context, in *RegisterMessage, opts ...grpc.CallOption) (*Noop, error) BroadcastGetCounts(ctx context.Context, in *Noop, opts ...grpc.CallOption) (*TotalsResponse, error) }
TrackerClient is the client API for Tracker service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewTrackerClient ¶
func NewTrackerClient(cc *grpc.ClientConn) TrackerClient
type TrackerGrain ¶
type TrackerGrain struct {
ID string
}
TrackerGrain holds the base data for the TrackerGrain
func GetTrackerGrain ¶
func GetTrackerGrain(id string) *TrackerGrain
GetTrackerGrain instantiates a new TrackerGrain with given ID
func (*TrackerGrain) BroadcastGetCounts ¶
func (g *TrackerGrain) BroadcastGetCounts(r *Noop) (*TotalsResponse, error)
BroadcastGetCounts requests the execution on to the cluster using default options
func (*TrackerGrain) BroadcastGetCountsChan ¶
func (g *TrackerGrain) BroadcastGetCountsChan(r *Noop) (<-chan *TotalsResponse, <-chan error)
BroadcastGetCountsChan allows to use a channel to execute the method using default options
func (*TrackerGrain) BroadcastGetCountsChanWithOpts ¶
func (g *TrackerGrain) BroadcastGetCountsChanWithOpts(r *Noop, opts *cluster.GrainCallOptions) (<-chan *TotalsResponse, <-chan error)
BroadcastGetCountsChanWithOpts allows to use a channel to execute the method
func (*TrackerGrain) BroadcastGetCountsWithOpts ¶
func (g *TrackerGrain) BroadcastGetCountsWithOpts(r *Noop, opts *cluster.GrainCallOptions) (*TotalsResponse, error)
BroadcastGetCountsWithOpts requests the execution on to the cluster
func (*TrackerGrain) DeregisterGrain ¶
func (g *TrackerGrain) DeregisterGrain(r *RegisterMessage) (*Noop, error)
DeregisterGrain requests the execution on to the cluster using default options
func (*TrackerGrain) DeregisterGrainChan ¶
func (g *TrackerGrain) DeregisterGrainChan(r *RegisterMessage) (<-chan *Noop, <-chan error)
DeregisterGrainChan allows to use a channel to execute the method using default options
func (*TrackerGrain) DeregisterGrainChanWithOpts ¶
func (g *TrackerGrain) DeregisterGrainChanWithOpts(r *RegisterMessage, opts *cluster.GrainCallOptions) (<-chan *Noop, <-chan error)
DeregisterGrainChanWithOpts allows to use a channel to execute the method
func (*TrackerGrain) DeregisterGrainWithOpts ¶
func (g *TrackerGrain) DeregisterGrainWithOpts(r *RegisterMessage, opts *cluster.GrainCallOptions) (*Noop, error)
DeregisterGrainWithOpts requests the execution on to the cluster
func (*TrackerGrain) RegisterGrain ¶
func (g *TrackerGrain) RegisterGrain(r *RegisterMessage) (*Noop, error)
RegisterGrain requests the execution on to the cluster using default options
func (*TrackerGrain) RegisterGrainChan ¶
func (g *TrackerGrain) RegisterGrainChan(r *RegisterMessage) (<-chan *Noop, <-chan error)
RegisterGrainChan allows to use a channel to execute the method using default options
func (*TrackerGrain) RegisterGrainChanWithOpts ¶
func (g *TrackerGrain) RegisterGrainChanWithOpts(r *RegisterMessage, opts *cluster.GrainCallOptions) (<-chan *Noop, <-chan error)
RegisterGrainChanWithOpts allows to use a channel to execute the method
func (*TrackerGrain) RegisterGrainWithOpts ¶
func (g *TrackerGrain) RegisterGrainWithOpts(r *RegisterMessage, opts *cluster.GrainCallOptions) (*Noop, error)
RegisterGrainWithOpts requests the execution on to the cluster
type TrackerServer ¶
type TrackerServer interface { RegisterGrain(context.Context, *RegisterMessage) (*Noop, error) DeregisterGrain(context.Context, *RegisterMessage) (*Noop, error) BroadcastGetCounts(context.Context, *Noop) (*TotalsResponse, error) }
TrackerServer is the server API for Tracker service.
type UnimplementedCalculatorServer ¶
type UnimplementedCalculatorServer struct { }
UnimplementedCalculatorServer can be embedded to have forward compatible implementations.
func (*UnimplementedCalculatorServer) Add ¶
func (*UnimplementedCalculatorServer) Add(ctx context.Context, req *NumberRequest) (*CountResponse, error)
func (*UnimplementedCalculatorServer) GetCurrent ¶
func (*UnimplementedCalculatorServer) GetCurrent(ctx context.Context, req *Noop) (*CountResponse, error)
func (*UnimplementedCalculatorServer) Subtract ¶
func (*UnimplementedCalculatorServer) Subtract(ctx context.Context, req *NumberRequest) (*CountResponse, error)
type UnimplementedTrackerServer ¶
type UnimplementedTrackerServer struct { }
UnimplementedTrackerServer can be embedded to have forward compatible implementations.
func (*UnimplementedTrackerServer) BroadcastGetCounts ¶
func (*UnimplementedTrackerServer) BroadcastGetCounts(ctx context.Context, req *Noop) (*TotalsResponse, error)
func (*UnimplementedTrackerServer) DeregisterGrain ¶
func (*UnimplementedTrackerServer) DeregisterGrain(ctx context.Context, req *RegisterMessage) (*Noop, error)
func (*UnimplementedTrackerServer) RegisterGrain ¶
func (*UnimplementedTrackerServer) RegisterGrain(ctx context.Context, req *RegisterMessage) (*Noop, error)