cluster

package
v0.0.0-...-be88ffe Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2022 License: Apache-2.0 Imports: 31 Imported by: 0

README

Proto.Actor Cluster - Virtual Actors (Alpha)

Massively distributed actors for GO

Proto.Actor supports the classic actor model also found in Erlang and Akka.
Our cluster support however uses a different approach, Virtual Actor Model.

This is a model where each actor appears to always exist. There is no lifecycle as in the classic actor model. You get a reference to the actor by asking for it's ID.

e.g.

hello := shared.GetHelloGrain("abc")
res := hello.SayHello(&shared.HelloRequest{Name: "Proto.Actor"})

This will ask the cluster where the 'abc' actor is located. If it does not yet exist, it will be created for you.

See Microsoft Orleans for more info about the Virtual Actor Model: http://dotnet.github.io/orleans/

How to

Protobuf IDL Definition

Start by defining your messages and grain contracts. You do this by using Protobuf IDL files.

Here is the definition from the /examples/cluster/shared example

syntax = "proto3";
package shared;

message HelloRequest {
  string name = 1;
}

message HelloResponse {
  string message = 1;
}

message AddRequest {
  double a = 1;
  double b = 2;
}

message AddResponse {
  double result = 1;
}

service Hello {
  rpc SayHello (HelloRequest) returns (HelloResponse) {} 
  rpc Add(AddRequest) returns (AddResponse) {}
}

Once you have this, you can generate your code using the protobuf protoc compiler.

Windows

#generate messages
protoc -I=. -I=%GOPATH%\src --gogoslick_out=. protos.proto
#generate grains 
protoc -I=. -I=%GOPATH%\src --gorleans_out=. protos.proto 

Implementing

Once the messages and contracts have been generated, you can start implementing your own business logic. This is essentially a type which is powered by a Proto.Actor actor behind the scenes.

package shared

// a Go struct implementing the Hello interface
type hello struct {
}

func (*hello) SayHello(r *HelloRequest) *HelloResponse {
	return &HelloResponse{Message: "hello " + r.Name}
}

func (*hello) Add(r *AddRequest) *AddResponse {
	return &AddResponse{Result: r.A + r.B}
}

// Register what implementation Proto.Actor should use when 
// creating actors for a certain grain type.
func init() {
	// apply DI and setup logic
	HelloFactory(func() Hello { return &hello{} })
}

Seed nodes

func main() {
    cluster.Start("127.0.0.1:7711")
    console.ReadLine()
}

Member nodes

func main() {
	cluster.Start("127.0.0.1:0", "127.0.0.1:7711")

    // get a reference to the virtual actor called "abc" of type Hello
	hello := shared.GetHelloGrain("abc")
	res := hello.SayHello(&shared.HelloRequest{Name: "Proto.Actor"})
	log.Printf("Message from grain %v", res.Message)
}

FAQ

Can I use Proto.Actor Cluster in production?

The Proto.Actor Cluster support is in alpha version, thus not production ready.

What about performance?

Proto.Actor Remoting is able to pass 1 million+ messages per second on a standard dev machine. This is the same infrastructure used in Proto.Actor cluster. Proto.Actor Cluster however uses an RPC API, meaning it is Request/Response in nature. If you wait for a response for each call, the throughput will ofcourse be a lot less. Async Fire and forget for performance, Request/Response for simplicity.

Documentation

Index

Constants

View Source
const (
	TopologyKey   string = "topology"
	HearthbeatKey string = "heathbeat"
)
View Source
const (
	ActorNameIdentity  = "partition-identity"
	ActorNamePlacement = "partition-activator"
)
View Source
const DefaultGossipActorName string = "gossip"

Variables

View Source
var (
	ErrInvalidLengthGossip        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGossip          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGossip = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthProtos        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowProtos          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupProtos = fmt.Errorf("proto: unexpected end of group")
)

Functions

func NewGossipConsensusHandler

func NewGossipConsensusHandler() *gossipConsensusHandler

func SetLogLevel

func SetLogLevel(level log.Level)

SetLogLevel sets the log level for the logger.

SetLogLevel is safe to call concurrently

Types

type Activation

type Activation struct {
	Pid             *actor.PID       `protobuf:"bytes,1,opt,name=pid,proto3" json:"pid,omitempty"`
	ClusterIdentity *ClusterIdentity `protobuf:"bytes,2,opt,name=cluster_identity,json=clusterIdentity,proto3" json:"cluster_identity,omitempty"`
	EventId         uint64           `protobuf:"varint,3,opt,name=eventId,proto3" json:"eventId,omitempty"`
}

func (*Activation) Descriptor

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

func (*Activation) Equal

func (this *Activation) Equal(that interface{}) bool

func (*Activation) GetClusterIdentity

func (m *Activation) GetClusterIdentity() *ClusterIdentity

func (*Activation) GetEventId

func (m *Activation) GetEventId() uint64

func (*Activation) GetPid

func (m *Activation) GetPid() *actor.PID

func (*Activation) Marshal

func (m *Activation) Marshal() (dAtA []byte, err error)

func (*Activation) MarshalTo

func (m *Activation) MarshalTo(dAtA []byte) (int, error)

func (*Activation) MarshalToSizedBuffer

func (m *Activation) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Activation) ProtoMessage

func (*Activation) ProtoMessage()

func (*Activation) Reset

func (m *Activation) Reset()

func (*Activation) Size

func (m *Activation) Size() (n int)

func (*Activation) String

func (this *Activation) String() string

func (*Activation) Unmarshal

func (m *Activation) Unmarshal(dAtA []byte) error

func (*Activation) XXX_DiscardUnknown

func (m *Activation) XXX_DiscardUnknown()

func (*Activation) XXX_Marshal

func (m *Activation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Activation) XXX_Merge

func (m *Activation) XXX_Merge(src proto.Message)

func (*Activation) XXX_Size

func (m *Activation) XXX_Size() int

func (*Activation) XXX_Unmarshal

func (m *Activation) XXX_Unmarshal(b []byte) error

type ActivationRequest

type ActivationRequest struct {
	ClusterIdentity *ClusterIdentity `protobuf:"bytes,1,opt,name=cluster_identity,json=clusterIdentity,proto3" json:"cluster_identity,omitempty"`
	RequestId       string           `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
}

func (*ActivationRequest) Descriptor

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

func (*ActivationRequest) Equal

func (this *ActivationRequest) Equal(that interface{}) bool

func (*ActivationRequest) GetClusterIdentity

func (m *ActivationRequest) GetClusterIdentity() *ClusterIdentity

func (*ActivationRequest) GetRequestId

func (m *ActivationRequest) GetRequestId() string

func (*ActivationRequest) Marshal

func (m *ActivationRequest) Marshal() (dAtA []byte, err error)

func (*ActivationRequest) MarshalTo

func (m *ActivationRequest) MarshalTo(dAtA []byte) (int, error)

func (*ActivationRequest) MarshalToSizedBuffer

func (m *ActivationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ActivationRequest) ProtoMessage

func (*ActivationRequest) ProtoMessage()

func (*ActivationRequest) Reset

func (m *ActivationRequest) Reset()

func (*ActivationRequest) Size

func (m *ActivationRequest) Size() (n int)

func (*ActivationRequest) String

func (this *ActivationRequest) String() string

func (*ActivationRequest) Unmarshal

func (m *ActivationRequest) Unmarshal(dAtA []byte) error

func (*ActivationRequest) XXX_DiscardUnknown

func (m *ActivationRequest) XXX_DiscardUnknown()

func (*ActivationRequest) XXX_Marshal

func (m *ActivationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ActivationRequest) XXX_Merge

func (m *ActivationRequest) XXX_Merge(src proto.Message)

func (*ActivationRequest) XXX_Size

func (m *ActivationRequest) XXX_Size() int

func (*ActivationRequest) XXX_Unmarshal

func (m *ActivationRequest) XXX_Unmarshal(b []byte) error

type ActivationResponse

type ActivationResponse struct {
	Pid        *actor.PID `protobuf:"bytes,1,opt,name=pid,proto3" json:"pid,omitempty"`
	StatusCode uint32     `protobuf:"varint,2,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
}

func (*ActivationResponse) Descriptor

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

func (*ActivationResponse) Equal

func (this *ActivationResponse) Equal(that interface{}) bool

func (*ActivationResponse) GetPid

func (m *ActivationResponse) GetPid() *actor.PID

func (*ActivationResponse) GetStatusCode

func (m *ActivationResponse) GetStatusCode() uint32

func (*ActivationResponse) Marshal

func (m *ActivationResponse) Marshal() (dAtA []byte, err error)

func (*ActivationResponse) MarshalTo

func (m *ActivationResponse) MarshalTo(dAtA []byte) (int, error)

func (*ActivationResponse) MarshalToSizedBuffer

func (m *ActivationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ActivationResponse) ProtoMessage

func (*ActivationResponse) ProtoMessage()

func (*ActivationResponse) Reset

func (m *ActivationResponse) Reset()

func (*ActivationResponse) Size

func (m *ActivationResponse) Size() (n int)

func (*ActivationResponse) String

func (this *ActivationResponse) String() string

func (*ActivationResponse) Unmarshal

func (m *ActivationResponse) Unmarshal(dAtA []byte) error

func (*ActivationResponse) XXX_DiscardUnknown

func (m *ActivationResponse) XXX_DiscardUnknown()

func (*ActivationResponse) XXX_Marshal

func (m *ActivationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ActivationResponse) XXX_Merge

func (m *ActivationResponse) XXX_Merge(src proto.Message)

func (*ActivationResponse) XXX_Size

func (m *ActivationResponse) XXX_Size() int

func (*ActivationResponse) XXX_Unmarshal

func (m *ActivationResponse) XXX_Unmarshal(b []byte) error

type ActivationTerminated

type ActivationTerminated struct {
	Pid             *actor.PID       `protobuf:"bytes,1,opt,name=pid,proto3" json:"pid,omitempty"`
	ClusterIdentity *ClusterIdentity `protobuf:"bytes,2,opt,name=cluster_identity,json=clusterIdentity,proto3" json:"cluster_identity,omitempty"`
	EventId         uint64           `protobuf:"varint,3,opt,name=eventId,proto3" json:"eventId,omitempty"`
}

func (*ActivationTerminated) Descriptor

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

func (*ActivationTerminated) Equal

func (this *ActivationTerminated) Equal(that interface{}) bool

func (*ActivationTerminated) GetClusterIdentity

func (m *ActivationTerminated) GetClusterIdentity() *ClusterIdentity

func (*ActivationTerminated) GetEventId

func (m *ActivationTerminated) GetEventId() uint64

func (*ActivationTerminated) GetPid

func (m *ActivationTerminated) GetPid() *actor.PID

func (*ActivationTerminated) Marshal

func (m *ActivationTerminated) Marshal() (dAtA []byte, err error)

func (*ActivationTerminated) MarshalTo

func (m *ActivationTerminated) MarshalTo(dAtA []byte) (int, error)

func (*ActivationTerminated) MarshalToSizedBuffer

func (m *ActivationTerminated) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ActivationTerminated) ProtoMessage

func (*ActivationTerminated) ProtoMessage()

func (*ActivationTerminated) Reset

func (m *ActivationTerminated) Reset()

func (*ActivationTerminated) Size

func (m *ActivationTerminated) Size() (n int)

func (*ActivationTerminated) String

func (this *ActivationTerminated) String() string

func (*ActivationTerminated) Unmarshal

func (m *ActivationTerminated) Unmarshal(dAtA []byte) error

func (*ActivationTerminated) XXX_DiscardUnknown

func (m *ActivationTerminated) XXX_DiscardUnknown()

func (*ActivationTerminated) XXX_Marshal

func (m *ActivationTerminated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ActivationTerminated) XXX_Merge

func (m *ActivationTerminated) XXX_Merge(src proto.Message)

func (*ActivationTerminated) XXX_Size

func (m *ActivationTerminated) XXX_Size() int

func (*ActivationTerminated) XXX_Unmarshal

func (m *ActivationTerminated) XXX_Unmarshal(b []byte) error

type AddConsensusCheck

type AddConsensusCheck struct {
	ID    string
	Check *ConsensusCheck
}

func NewAddConsensusCheck

func NewAddConsensusCheck(id string, check *ConsensusCheck) AddConsensusCheck

type Cluster

type Cluster struct {
	ActorSystem *actor.ActorSystem
	Config      *Config
	Gossip      Gossiper

	MemberList *MemberList
	// contains filtered or unexported fields
}

func GetCluster

func GetCluster(actorSystem *actor.ActorSystem) *Cluster

func New

func New(actorSystem *actor.ActorSystem, config *Config) *Cluster

func (*Cluster) Call

func (c *Cluster) Call(name string, kind string, msg interface{}, callopts ...*GrainCallOptions) (interface{}, error)

Call is a wrap of context.RequestFuture with retries.

func (*Cluster) Get

func (c *Cluster) Get(name string, kind string) (*actor.PID, remote.ResponseStatusCode)

Get a PID to a virtual actor

func (*Cluster) GetBlockedMembers

func (c *Cluster) GetBlockedMembers() map[string]struct{}

func (*Cluster) GetClusterKind

func (c *Cluster) GetClusterKind(kind string) *actor.Props

func (*Cluster) GetClusterKinds

func (c *Cluster) GetClusterKinds() []string

GetClusterKinds Get kinds of virtual actor

func (*Cluster) GetV1

func (c *Cluster) GetV1(name string, kind string) (*actor.PID, remote.ResponseStatusCode)

Get a PID to a virtual actor

func (*Cluster) Id

func (c *Cluster) Id() extensions.ExtensionId

func (*Cluster) Shutdown

func (c *Cluster) Shutdown(graceful bool)

func (*Cluster) Start

func (c *Cluster) Start()

func (*Cluster) StartClient

func (c *Cluster) StartClient()

type ClusterIdentity

type ClusterIdentity struct {
	Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"`
	Kind     string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"`
}

func (*ClusterIdentity) AsKey

func (ci *ClusterIdentity) AsKey() string

func (*ClusterIdentity) Descriptor

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

func (*ClusterIdentity) Equal

func (this *ClusterIdentity) Equal(that interface{}) bool

func (*ClusterIdentity) GetIdentity

func (m *ClusterIdentity) GetIdentity() string

func (*ClusterIdentity) GetKind

func (m *ClusterIdentity) GetKind() string

func (*ClusterIdentity) Marshal

func (m *ClusterIdentity) Marshal() (dAtA []byte, err error)

func (*ClusterIdentity) MarshalTo

func (m *ClusterIdentity) MarshalTo(dAtA []byte) (int, error)

func (*ClusterIdentity) MarshalToSizedBuffer

func (m *ClusterIdentity) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ClusterIdentity) ProtoMessage

func (*ClusterIdentity) ProtoMessage()

func (*ClusterIdentity) Reset

func (m *ClusterIdentity) Reset()

func (*ClusterIdentity) Size

func (m *ClusterIdentity) Size() (n int)

func (*ClusterIdentity) String

func (this *ClusterIdentity) String() string

func (*ClusterIdentity) Unmarshal

func (m *ClusterIdentity) Unmarshal(dAtA []byte) error

func (*ClusterIdentity) XXX_DiscardUnknown

func (m *ClusterIdentity) XXX_DiscardUnknown()

func (*ClusterIdentity) XXX_Marshal

func (m *ClusterIdentity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClusterIdentity) XXX_Merge

func (m *ClusterIdentity) XXX_Merge(src proto.Message)

func (*ClusterIdentity) XXX_Size

func (m *ClusterIdentity) XXX_Size() int

func (*ClusterIdentity) XXX_Unmarshal

func (m *ClusterIdentity) XXX_Unmarshal(b []byte) error

type ClusterInit

type ClusterInit struct {
	ID   string
	Kind string
}

type ClusterProvider

type ClusterProvider interface {
	StartMember(cluster *Cluster) error
	StartClient(cluster *Cluster) error
	Shutdown(graceful bool) error
	UpdateClusterState(state ClusterState) error
}

type ClusterState

type ClusterState struct {
	BannedMembers []string `json:"bannedMembers"`
}

type ClusterTopology

type ClusterTopology struct {
	EventId uint64    `protobuf:"varint,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"`
	Members []*Member `protobuf:"bytes,2,rep,name=members,proto3" json:"members,omitempty"`
	Joined  []*Member `protobuf:"bytes,3,rep,name=joined,proto3" json:"joined,omitempty"`
	Left    []*Member `protobuf:"bytes,4,rep,name=left,proto3" json:"left,omitempty"`
	Banned  []*Member `protobuf:"bytes,5,rep,name=banned,proto3" json:"banned,omitempty"`
}

func (*ClusterTopology) Descriptor

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

func (*ClusterTopology) Equal

func (this *ClusterTopology) Equal(that interface{}) bool

func (*ClusterTopology) GetBanned

func (m *ClusterTopology) GetBanned() []*Member

func (*ClusterTopology) GetEventId

func (m *ClusterTopology) GetEventId() uint64

func (*ClusterTopology) GetJoined

func (m *ClusterTopology) GetJoined() []*Member

func (*ClusterTopology) GetLeft

func (m *ClusterTopology) GetLeft() []*Member

func (*ClusterTopology) GetMembers

func (m *ClusterTopology) GetMembers() []*Member

func (*ClusterTopology) Marshal

func (m *ClusterTopology) Marshal() (dAtA []byte, err error)

func (*ClusterTopology) MarshalTo

func (m *ClusterTopology) MarshalTo(dAtA []byte) (int, error)

func (*ClusterTopology) MarshalToSizedBuffer

func (m *ClusterTopology) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ClusterTopology) ProtoMessage

func (*ClusterTopology) ProtoMessage()

func (*ClusterTopology) Reset

func (m *ClusterTopology) Reset()

func (*ClusterTopology) Size

func (m *ClusterTopology) Size() (n int)

func (*ClusterTopology) String

func (this *ClusterTopology) String() string

func (*ClusterTopology) Unmarshal

func (m *ClusterTopology) Unmarshal(dAtA []byte) error

func (*ClusterTopology) XXX_DiscardUnknown

func (m *ClusterTopology) XXX_DiscardUnknown()

func (*ClusterTopology) XXX_Marshal

func (m *ClusterTopology) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClusterTopology) XXX_Merge

func (m *ClusterTopology) XXX_Merge(src proto.Message)

func (*ClusterTopology) XXX_Size

func (m *ClusterTopology) XXX_Size() int

func (*ClusterTopology) XXX_Unmarshal

func (m *ClusterTopology) XXX_Unmarshal(b []byte) error

type ClusterTopologyEventV2

type ClusterTopologyEventV2 struct {
	*ClusterTopology
	// contains filtered or unexported fields
}

type Config

type Config struct {
	Name                  string
	Address               string
	ClusterProvider       ClusterProvider
	RemoteConfig          remote.Config
	TimeoutTime           time.Duration
	GossipInterval        time.Duration
	GossipRequestTimeout  time.Duration
	GossipFanOut          int
	GossipMaxSend         int
	MemberStrategyBuilder func(kind string) MemberStrategy
	Kinds                 map[string]*actor.Props
}

func Configure

func Configure(clusterName string, clusterProvider ClusterProvider, remoteConfig remote.Config, kinds ...*Kind) *Config

func (*Config) WithTimeout

func (c *Config) WithTimeout(t time.Duration) *Config

type ConsensusCheck

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

data structure helpful to store consensus check information and behavior

func NewConsensusCheck

func NewConsensusCheck(affectedKeys []string, check GossipUpdater) ConsensusCheck

creates a new ConsensusCheck value with the given data and return it back

type ConsensusCheckBuilder

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

func NewConsensusCheckBuilder

func NewConsensusCheckBuilder(key string, getValue func(*types.Any) interface{}) *ConsensusCheckBuilder

func (*ConsensusCheckBuilder) AffectedKeys

func (ccb *ConsensusCheckBuilder) AffectedKeys() []string

func (*ConsensusCheckBuilder) Build

Builds a new ConsensusHandler and ConsensusCheck values and returns pointers to them

func (*ConsensusCheckBuilder) Check

func (*ConsensusCheckBuilder) HasConsensus

func (ccb *ConsensusCheckBuilder) HasConsensus(memberValues []*consensusMemberValue) (bool, uint64)

func (*ConsensusCheckBuilder) MapToValue

func (ccb *ConsensusCheckBuilder) MapToValue(valueTuple *consensusValue) func(string, *GossipMemberState) (string, string, uint64)

type ConsensusCheckDefinition

type ConsensusCheckDefinition interface {
	Check() *ConsensusCheck
	AffectedKeys() map[string]struct{}
}

type ConsensusChecker

type ConsensusChecker func(*GossipState, map[string]empty) (bool, interface{})

Customary type used to provide consensus check callbacks of any type note: this is equivalent to (for future go v1.18):

type ConsensusChecker[T] func(GossipState, map[string]empty) (bool, T)

type ConsensusChecks

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

acts as an storage of pointers to ConsensusCheck stored by key

func NewConsensusChecks

func NewConsensusChecks() *ConsensusChecks

creates a new ConsensusChecks value and returns a pointer to it

func (*ConsensusChecks) Add

func (cc *ConsensusChecks) Add(id string, check *ConsensusCheck)

adds a new pointer to a ConsensusCheck value in the storage and registers its affected by keys index

func (*ConsensusChecks) GetByUpdatedKey

func (cc *ConsensusChecks) GetByUpdatedKey(key string) []*ConsensusCheck

iterates over all the keys stored in the set (map[string]empty) found in the given key map and populates a slice of pointers to ConsensusCheck values that is returned back as a set of ConsensusCheck updated by the given key

func (*ConsensusChecks) GetByUpdatedKeys

func (cc *ConsensusChecks) GetByUpdatedKeys(keys []string) []*ConsensusCheck

iterate over all of the keys stored in the set (map[string]empty) found in the given key maps and populates a slice of pointers to ConsensusCheck values that is returned back as a set of ConsensusCheck updated by the given keys with removed duplicates on it (as it is a "set")

func (*ConsensusChecks) Remove

func (cc *ConsensusChecks) Remove(id string)

removed the given ConsensusCheck id from the storage and removes its affected by keys index if needed after cleaning

type ConsensusHandler

type ConsensusHandler interface {
	GetID() string
	TryGetConsensus(context.Context) (interface{}, bool)
}

type GetGossipStateRequest

type GetGossipStateRequest struct {
	Key string
}

Used to query the GossipActor about a given key status

func NewGetGossipStateRequest

func NewGetGossipStateRequest(key string) GetGossipStateRequest

Create a new GetGossipStateRequest value and return it back

type GetGossipStateResponse

type GetGossipStateResponse struct {
	State map[string]*types.Any
}

Used by the GossipActor to send back the status value of a given key

func NewGetGossipStateResponse

func NewGetGossipStateResponse(state map[string]*types.Any) GetGossipStateResponse

type Gossip

The Gossip interface must be implemented by any value that pretends to participate with-in the Gossip protocol

type GossipActor

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

Actor used to send gossip messages around

func NewGossipActor

func NewGossipActor(requestTimeout time.Duration, myID string, getBlockedMembers func() map[string]empty, fanOut int, maxSend int) *GossipActor

Creates a new GossipActor and returns a pointer to its location in the heap

func (*GossipActor) Receive

func (ga *GossipActor) Receive(ctx actor.Context)

Receive method

func (*GossipActor) ReceiveState

func (ga *GossipActor) ReceiveState(remoteState *GossipState, ctx actor.Context)

type GossipConsensusChecker

type GossipConsensusChecker interface {
	AddConsensusCheck(id string, check *ConsensusCheck)
	RemoveConsensusCheck(id string)
}

This interface must be implemented by any value that wants to add or remove consensus checkers

type GossipCore

type GossipCore interface {
	UpdateClusterTopology(topology *ClusterTopology)
	ReceiveState(remoteState *GossipState) []*GossipUpdate
	SendState(sendStateToMember LocalStateSender)
	GetMemberStateDelta(targetMemberID string) MemberStateDelta
}

This interface must be implemented by any value that wants to react to cluster topology events

type GossipDeltaValue

type GossipDeltaValue struct {
	Entries []*GossipDeltaValue_GossipDeltaEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
}

represents a value that can be sent in form of a delta change instead of a full value replace

func (*GossipDeltaValue) Descriptor

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

func (*GossipDeltaValue) Equal

func (this *GossipDeltaValue) Equal(that interface{}) bool

func (*GossipDeltaValue) GetEntries

func (*GossipDeltaValue) GoString

func (this *GossipDeltaValue) GoString() string

func (*GossipDeltaValue) Marshal

func (m *GossipDeltaValue) Marshal() (dAtA []byte, err error)

func (*GossipDeltaValue) MarshalTo

func (m *GossipDeltaValue) MarshalTo(dAtA []byte) (int, error)

func (*GossipDeltaValue) MarshalToSizedBuffer

func (m *GossipDeltaValue) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GossipDeltaValue) ProtoMessage

func (*GossipDeltaValue) ProtoMessage()

func (*GossipDeltaValue) Reset

func (m *GossipDeltaValue) Reset()

func (*GossipDeltaValue) Size

func (m *GossipDeltaValue) Size() (n int)

func (*GossipDeltaValue) String

func (this *GossipDeltaValue) String() string

func (*GossipDeltaValue) Unmarshal

func (m *GossipDeltaValue) Unmarshal(dAtA []byte) error

func (*GossipDeltaValue) XXX_DiscardUnknown

func (m *GossipDeltaValue) XXX_DiscardUnknown()

func (*GossipDeltaValue) XXX_Marshal

func (m *GossipDeltaValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GossipDeltaValue) XXX_Merge

func (m *GossipDeltaValue) XXX_Merge(src proto.Message)

func (*GossipDeltaValue) XXX_Size

func (m *GossipDeltaValue) XXX_Size() int

func (*GossipDeltaValue) XXX_Unmarshal

func (m *GossipDeltaValue) XXX_Unmarshal(b []byte) error

type GossipDeltaValue_GossipDeltaEntry

type GossipDeltaValue_GossipDeltaEntry struct {
	SequenceNumber int64  `protobuf:"varint,1,opt,name=sequence_number,json=sequenceNumber,proto3" json:"sequence_number,omitempty"`
	Data           []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
}

these are the entries of a delta value this can be seen as an array with data, where each element in the array is tagged with a sequence number

func (*GossipDeltaValue_GossipDeltaEntry) Descriptor

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

func (*GossipDeltaValue_GossipDeltaEntry) Equal

func (this *GossipDeltaValue_GossipDeltaEntry) Equal(that interface{}) bool

func (*GossipDeltaValue_GossipDeltaEntry) GetData

func (m *GossipDeltaValue_GossipDeltaEntry) GetData() []byte

func (*GossipDeltaValue_GossipDeltaEntry) GetSequenceNumber

func (m *GossipDeltaValue_GossipDeltaEntry) GetSequenceNumber() int64

func (*GossipDeltaValue_GossipDeltaEntry) GoString

func (this *GossipDeltaValue_GossipDeltaEntry) GoString() string

func (*GossipDeltaValue_GossipDeltaEntry) Marshal

func (m *GossipDeltaValue_GossipDeltaEntry) Marshal() (dAtA []byte, err error)

func (*GossipDeltaValue_GossipDeltaEntry) MarshalTo

func (m *GossipDeltaValue_GossipDeltaEntry) MarshalTo(dAtA []byte) (int, error)

func (*GossipDeltaValue_GossipDeltaEntry) MarshalToSizedBuffer

func (m *GossipDeltaValue_GossipDeltaEntry) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GossipDeltaValue_GossipDeltaEntry) ProtoMessage

func (*GossipDeltaValue_GossipDeltaEntry) ProtoMessage()

func (*GossipDeltaValue_GossipDeltaEntry) Reset

func (*GossipDeltaValue_GossipDeltaEntry) Size

func (m *GossipDeltaValue_GossipDeltaEntry) Size() (n int)

func (*GossipDeltaValue_GossipDeltaEntry) String

func (*GossipDeltaValue_GossipDeltaEntry) Unmarshal

func (m *GossipDeltaValue_GossipDeltaEntry) Unmarshal(dAtA []byte) error

func (*GossipDeltaValue_GossipDeltaEntry) XXX_DiscardUnknown

func (m *GossipDeltaValue_GossipDeltaEntry) XXX_DiscardUnknown()

func (*GossipDeltaValue_GossipDeltaEntry) XXX_Marshal

func (m *GossipDeltaValue_GossipDeltaEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GossipDeltaValue_GossipDeltaEntry) XXX_Merge

func (*GossipDeltaValue_GossipDeltaEntry) XXX_Size

func (m *GossipDeltaValue_GossipDeltaEntry) XXX_Size() int

func (*GossipDeltaValue_GossipDeltaEntry) XXX_Unmarshal

func (m *GossipDeltaValue_GossipDeltaEntry) XXX_Unmarshal(b []byte) error

type GossipKeyValue

type GossipKeyValue struct {
	SequenceNumber int64      `protobuf:"varint,2,opt,name=sequence_number,json=sequenceNumber,proto3" json:"sequence_number,omitempty"`
	Value          *types.Any `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
}

a known key might be heartbeat. if we locally tag each entry with a local timestamp this means that we can measure if we have not received a new heartbeat from one member in some time even if we don't know the exact time the heartbeat was issued, due to clock differences. we still know when _we_ as in this node, got this data. and we can measure time from then til now.

if we got a hear-beat from another node, and X seconds pass, we can assume it to be dead

func (*GossipKeyValue) Descriptor

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

func (*GossipKeyValue) Equal

func (this *GossipKeyValue) Equal(that interface{}) bool

func (*GossipKeyValue) GetSequenceNumber

func (m *GossipKeyValue) GetSequenceNumber() int64

func (*GossipKeyValue) GetValue

func (m *GossipKeyValue) GetValue() *types.Any

func (*GossipKeyValue) GoString

func (this *GossipKeyValue) GoString() string

func (*GossipKeyValue) Marshal

func (m *GossipKeyValue) Marshal() (dAtA []byte, err error)

func (*GossipKeyValue) MarshalTo

func (m *GossipKeyValue) MarshalTo(dAtA []byte) (int, error)

func (*GossipKeyValue) MarshalToSizedBuffer

func (m *GossipKeyValue) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GossipKeyValue) ProtoMessage

func (*GossipKeyValue) ProtoMessage()

func (*GossipKeyValue) Reset

func (m *GossipKeyValue) Reset()

func (*GossipKeyValue) Size

func (m *GossipKeyValue) Size() (n int)

func (*GossipKeyValue) String

func (this *GossipKeyValue) String() string

func (*GossipKeyValue) Unmarshal

func (m *GossipKeyValue) Unmarshal(dAtA []byte) error

func (*GossipKeyValue) XXX_DiscardUnknown

func (m *GossipKeyValue) XXX_DiscardUnknown()

func (*GossipKeyValue) XXX_Marshal

func (m *GossipKeyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GossipKeyValue) XXX_Merge

func (m *GossipKeyValue) XXX_Merge(src proto.Message)

func (*GossipKeyValue) XXX_Size

func (m *GossipKeyValue) XXX_Size() int

func (*GossipKeyValue) XXX_Unmarshal

func (m *GossipKeyValue) XXX_Unmarshal(b []byte) error

type GossipMemberState

type GossipMemberState = GossipState_GossipMemberState

convenience type alias

type GossipRequest

type GossipRequest struct {
	State    *GossipState `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"`
	MemberId string       `protobuf:"bytes,2,opt,name=member_id,json=memberId,proto3" json:"member_id,omitempty"`
}

func (*GossipRequest) Descriptor

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

func (*GossipRequest) Equal

func (this *GossipRequest) Equal(that interface{}) bool

func (*GossipRequest) GetMemberId

func (m *GossipRequest) GetMemberId() string

func (*GossipRequest) GetState

func (m *GossipRequest) GetState() *GossipState

func (*GossipRequest) GoString

func (this *GossipRequest) GoString() string

func (*GossipRequest) Marshal

func (m *GossipRequest) Marshal() (dAtA []byte, err error)

func (*GossipRequest) MarshalTo

func (m *GossipRequest) MarshalTo(dAtA []byte) (int, error)

func (*GossipRequest) MarshalToSizedBuffer

func (m *GossipRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GossipRequest) ProtoMessage

func (*GossipRequest) ProtoMessage()

func (*GossipRequest) Reset

func (m *GossipRequest) Reset()

func (*GossipRequest) Size

func (m *GossipRequest) Size() (n int)

func (*GossipRequest) String

func (this *GossipRequest) String() string

func (*GossipRequest) Unmarshal

func (m *GossipRequest) Unmarshal(dAtA []byte) error

func (*GossipRequest) XXX_DiscardUnknown

func (m *GossipRequest) XXX_DiscardUnknown()

func (*GossipRequest) XXX_Marshal

func (m *GossipRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GossipRequest) XXX_Merge

func (m *GossipRequest) XXX_Merge(src proto.Message)

func (*GossipRequest) XXX_Size

func (m *GossipRequest) XXX_Size() int

func (*GossipRequest) XXX_Unmarshal

func (m *GossipRequest) XXX_Unmarshal(b []byte) error

type GossipResponse

type GossipResponse struct {
	State *GossipState `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"`
}

Ack a gossip request

func (*GossipResponse) Descriptor

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

func (*GossipResponse) Equal

func (this *GossipResponse) Equal(that interface{}) bool

func (*GossipResponse) GetState

func (m *GossipResponse) GetState() *GossipState

func (*GossipResponse) GoString

func (this *GossipResponse) GoString() string

func (*GossipResponse) Marshal

func (m *GossipResponse) Marshal() (dAtA []byte, err error)

func (*GossipResponse) MarshalTo

func (m *GossipResponse) MarshalTo(dAtA []byte) (int, error)

func (*GossipResponse) MarshalToSizedBuffer

func (m *GossipResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GossipResponse) ProtoMessage

func (*GossipResponse) ProtoMessage()

func (*GossipResponse) Reset

func (m *GossipResponse) Reset()

func (*GossipResponse) Size

func (m *GossipResponse) Size() (n int)

func (*GossipResponse) String

func (this *GossipResponse) String() string

func (*GossipResponse) Unmarshal

func (m *GossipResponse) Unmarshal(dAtA []byte) error

func (*GossipResponse) XXX_DiscardUnknown

func (m *GossipResponse) XXX_DiscardUnknown()

func (*GossipResponse) XXX_Marshal

func (m *GossipResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GossipResponse) XXX_Merge

func (m *GossipResponse) XXX_Merge(src proto.Message)

func (*GossipResponse) XXX_Size

func (m *GossipResponse) XXX_Size() int

func (*GossipResponse) XXX_Unmarshal

func (m *GossipResponse) XXX_Unmarshal(b []byte) error

type GossipResponseAck

type GossipResponseAck struct {
}

func (*GossipResponseAck) Descriptor

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

func (*GossipResponseAck) Equal

func (this *GossipResponseAck) Equal(that interface{}) bool

func (*GossipResponseAck) GoString

func (this *GossipResponseAck) GoString() string

func (*GossipResponseAck) Marshal

func (m *GossipResponseAck) Marshal() (dAtA []byte, err error)

func (*GossipResponseAck) MarshalTo

func (m *GossipResponseAck) MarshalTo(dAtA []byte) (int, error)

func (*GossipResponseAck) MarshalToSizedBuffer

func (m *GossipResponseAck) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GossipResponseAck) ProtoMessage

func (*GossipResponseAck) ProtoMessage()

func (*GossipResponseAck) Reset

func (m *GossipResponseAck) Reset()

func (*GossipResponseAck) Size

func (m *GossipResponseAck) Size() (n int)

func (*GossipResponseAck) String

func (this *GossipResponseAck) String() string

func (*GossipResponseAck) Unmarshal

func (m *GossipResponseAck) Unmarshal(dAtA []byte) error

func (*GossipResponseAck) XXX_DiscardUnknown

func (m *GossipResponseAck) XXX_DiscardUnknown()

func (*GossipResponseAck) XXX_Marshal

func (m *GossipResponseAck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GossipResponseAck) XXX_Merge

func (m *GossipResponseAck) XXX_Merge(src proto.Message)

func (*GossipResponseAck) XXX_Size

func (m *GossipResponseAck) XXX_Size() int

func (*GossipResponseAck) XXX_Unmarshal

func (m *GossipResponseAck) XXX_Unmarshal(b []byte) error

type GossipState

type GossipState struct {
	Members map[string]*GossipState_GossipMemberState `` /* 155-byte string literal not displayed */
}

two GossipState objects can be merged key + member_id gets it's own entry, if collision, highest version is selected

func (*GossipState) Descriptor

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

func (*GossipState) Equal

func (this *GossipState) Equal(that interface{}) bool

func (*GossipState) GetMembers

func (m *GossipState) GetMembers() map[string]*GossipState_GossipMemberState

func (*GossipState) GoString

func (this *GossipState) GoString() string

func (*GossipState) Marshal

func (m *GossipState) Marshal() (dAtA []byte, err error)

func (*GossipState) MarshalTo

func (m *GossipState) MarshalTo(dAtA []byte) (int, error)

func (*GossipState) MarshalToSizedBuffer

func (m *GossipState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GossipState) ProtoMessage

func (*GossipState) ProtoMessage()

func (*GossipState) Reset

func (m *GossipState) Reset()

func (*GossipState) Size

func (m *GossipState) Size() (n int)

func (*GossipState) String

func (this *GossipState) String() string

func (*GossipState) Unmarshal

func (m *GossipState) Unmarshal(dAtA []byte) error

func (*GossipState) XXX_DiscardUnknown

func (m *GossipState) XXX_DiscardUnknown()

func (*GossipState) XXX_Marshal

func (m *GossipState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GossipState) XXX_Merge

func (m *GossipState) XXX_Merge(src proto.Message)

func (*GossipState) XXX_Size

func (m *GossipState) XXX_Size() int

func (*GossipState) XXX_Unmarshal

func (m *GossipState) XXX_Unmarshal(b []byte) error

type GossipStateStorer

type GossipStateStorer interface {
	GetState(key string) map[string]*types.Any
	SetState(key string, value proto.Message)
}

This interface must be implemented by any value that wants to be used as a gossip state storage

type GossipState_GossipMemberState

type GossipState_GossipMemberState struct {
	Values map[string]*GossipKeyValue `` /* 153-byte string literal not displayed */
}

func (*GossipState_GossipMemberState) Descriptor

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

func (*GossipState_GossipMemberState) Equal

func (this *GossipState_GossipMemberState) Equal(that interface{}) bool

func (*GossipState_GossipMemberState) GetValues

func (*GossipState_GossipMemberState) GoString

func (this *GossipState_GossipMemberState) GoString() string

func (*GossipState_GossipMemberState) Marshal

func (m *GossipState_GossipMemberState) Marshal() (dAtA []byte, err error)

func (*GossipState_GossipMemberState) MarshalTo

func (m *GossipState_GossipMemberState) MarshalTo(dAtA []byte) (int, error)

func (*GossipState_GossipMemberState) MarshalToSizedBuffer

func (m *GossipState_GossipMemberState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GossipState_GossipMemberState) ProtoMessage

func (*GossipState_GossipMemberState) ProtoMessage()

func (*GossipState_GossipMemberState) Reset

func (m *GossipState_GossipMemberState) Reset()

func (*GossipState_GossipMemberState) Size

func (m *GossipState_GossipMemberState) Size() (n int)

func (*GossipState_GossipMemberState) String

func (this *GossipState_GossipMemberState) String() string

func (*GossipState_GossipMemberState) Unmarshal

func (m *GossipState_GossipMemberState) Unmarshal(dAtA []byte) error

func (*GossipState_GossipMemberState) XXX_DiscardUnknown

func (m *GossipState_GossipMemberState) XXX_DiscardUnknown()

func (*GossipState_GossipMemberState) XXX_Marshal

func (m *GossipState_GossipMemberState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GossipState_GossipMemberState) XXX_Merge

func (m *GossipState_GossipMemberState) XXX_Merge(src proto.Message)

func (*GossipState_GossipMemberState) XXX_Size

func (m *GossipState_GossipMemberState) XXX_Size() int

func (*GossipState_GossipMemberState) XXX_Unmarshal

func (m *GossipState_GossipMemberState) XXX_Unmarshal(b []byte) error

type GossipUpdate

type GossipUpdate struct {
	MemberID, Key string
	Value         *types.Any
	SeqNumber     int64
}

Used to update gossip data when a Clustertopology event occurs

type GossipUpdater

type GossipUpdater func(*GossipState, map[string]empty)

type Gossiper

type Gossiper struct {
	// The Gossiper Actor Name, defaults to "gossip"
	GossipActorName string
	// contains filtered or unexported fields
}

The Gossiper data structure manages Gossip

func (*Gossiper) GetState

func (g *Gossiper) GetState(key string) (map[string]*types.Any, error)

func (*Gossiper) RegisterConsensusCheck

func (g *Gossiper) RegisterConsensusCheck(key string, getValue func(*types.Any) interface{}) ConsensusHandler

Builds a consensus handler and a consensus checker, send the checker to the Gossip actor and returns the handler back to the caller

func (*Gossiper) SendState

func (g *Gossiper) SendState()

func (*Gossiper) SetState

func (g *Gossiper) SetState(key string, value proto.Message)

Sends fire and forget message to update member state

func (*Gossiper) SetStateRequest

func (g *Gossiper) SetStateRequest(key string, value proto.Message) error

Sends a Request (that blocks) to update member state

func (*Gossiper) Shutdown

func (g *Gossiper) Shutdown()

func (*Gossiper) StartGossiping

func (g *Gossiper) StartGossiping() error

type Grain

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

func (*Grain) ID

func (g *Grain) ID() string

func (*Grain) Init

func (g *Grain) Init(id string)

type GrainCallOptions

type GrainCallOptions struct {
	RetryCount  int
	Timeout     time.Duration
	RetryAction func(n int)
}

func DefaultGrainCallOptions

func DefaultGrainCallOptions(cluster *Cluster) *GrainCallOptions

func NewGrainCallOptions

func NewGrainCallOptions(cluster *Cluster) *GrainCallOptions

func (*GrainCallOptions) WithRetry

func (config *GrainCallOptions) WithRetry(count int) *GrainCallOptions

func (*GrainCallOptions) WithRetryAction

func (config *GrainCallOptions) WithRetryAction(act func(i int)) *GrainCallOptions

func (*GrainCallOptions) WithTimeout

func (config *GrainCallOptions) WithTimeout(timeout time.Duration) *GrainCallOptions

type GrainContext

type GrainContext interface {
	// Self returns the PID for the current actor
	Self() *actor.PID

	// Returns a slice of the actors children
	Children() []*actor.PID

	// Watch registers the actor as a monitor for the specified PID
	Watch(pid *actor.PID)

	// Unwatch unregisters the actor as a monitor for the specified PID
	Unwatch(pid *actor.PID)

	// Sender returns the PID of actor that sent currently processed message
	Sender() *actor.PID

	// Message returns the current message to be processed
	Message() interface{}

	// Tell sends a message to the given PID
	Send(pid *actor.PID, message interface{})

	// Request sends a message to the given PID and also provides a Sender PID
	Request(pid *actor.PID, message interface{})

	// RequestFuture sends a message to a given PID and returns a Future
	RequestFuture(pid *actor.PID, message interface{}, timeout time.Duration) *actor.Future

	// Spawn starts a new child actor based on props and named with a unique id
	Spawn(props *actor.Props) *actor.PID

	// SpawnPrefix starts a new child actor based on props and named using a prefix followed by a unique id
	SpawnPrefix(props *actor.Props, prefix string) *actor.PID

	// SpawnNamed starts a new child actor based on props and named using the specified name
	//
	// ErrNameExists will be returned if id already exists
	SpawnNamed(props *actor.Props, id string) (*actor.PID, error)
}

type GrainErrorResponse

type GrainErrorResponse struct {
	Err  string `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"`
	Code int32  `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"`
}

func (*GrainErrorResponse) Descriptor

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

func (*GrainErrorResponse) Equal

func (this *GrainErrorResponse) Equal(that interface{}) bool

func (*GrainErrorResponse) GetCode

func (m *GrainErrorResponse) GetCode() int32

func (*GrainErrorResponse) GetErr

func (m *GrainErrorResponse) GetErr() string

func (*GrainErrorResponse) Marshal

func (m *GrainErrorResponse) Marshal() (dAtA []byte, err error)

func (*GrainErrorResponse) MarshalTo

func (m *GrainErrorResponse) MarshalTo(dAtA []byte) (int, error)

func (*GrainErrorResponse) MarshalToSizedBuffer

func (m *GrainErrorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GrainErrorResponse) ProtoMessage

func (*GrainErrorResponse) ProtoMessage()

func (*GrainErrorResponse) Reset

func (m *GrainErrorResponse) Reset()

func (*GrainErrorResponse) Size

func (m *GrainErrorResponse) Size() (n int)

func (*GrainErrorResponse) String

func (this *GrainErrorResponse) String() string

func (*GrainErrorResponse) Unmarshal

func (m *GrainErrorResponse) Unmarshal(dAtA []byte) error

func (*GrainErrorResponse) XXX_DiscardUnknown

func (m *GrainErrorResponse) XXX_DiscardUnknown()

func (*GrainErrorResponse) XXX_Marshal

func (m *GrainErrorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GrainErrorResponse) XXX_Merge

func (m *GrainErrorResponse) XXX_Merge(src proto.Message)

func (*GrainErrorResponse) XXX_Size

func (m *GrainErrorResponse) XXX_Size() int

func (*GrainErrorResponse) XXX_Unmarshal

func (m *GrainErrorResponse) XXX_Unmarshal(b []byte) error

type GrainMeta

type GrainMeta struct {
	ID      *ClusterIdentity
	PID     *actor.PID
	EventID uint64
}

type GrainRequest

type GrainRequest struct {
	MethodIndex int32  `protobuf:"varint,1,opt,name=method_index,json=methodIndex,proto3" json:"method_index,omitempty"`
	MessageData []byte `protobuf:"bytes,2,opt,name=message_data,json=messageData,proto3" json:"message_data,omitempty"`
}

func (*GrainRequest) Descriptor

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

func (*GrainRequest) Equal

func (this *GrainRequest) Equal(that interface{}) bool

func (*GrainRequest) GetMessageData

func (m *GrainRequest) GetMessageData() []byte

func (*GrainRequest) GetMethodIndex

func (m *GrainRequest) GetMethodIndex() int32

func (*GrainRequest) Marshal

func (m *GrainRequest) Marshal() (dAtA []byte, err error)

func (*GrainRequest) MarshalTo

func (m *GrainRequest) MarshalTo(dAtA []byte) (int, error)

func (*GrainRequest) MarshalToSizedBuffer

func (m *GrainRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GrainRequest) ProtoMessage

func (*GrainRequest) ProtoMessage()

func (*GrainRequest) Reset

func (m *GrainRequest) Reset()

func (*GrainRequest) Size

func (m *GrainRequest) Size() (n int)

func (*GrainRequest) String

func (this *GrainRequest) String() string

func (*GrainRequest) Unmarshal

func (m *GrainRequest) Unmarshal(dAtA []byte) error

func (*GrainRequest) XXX_DiscardUnknown

func (m *GrainRequest) XXX_DiscardUnknown()

func (*GrainRequest) XXX_Marshal

func (m *GrainRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GrainRequest) XXX_Merge

func (m *GrainRequest) XXX_Merge(src proto.Message)

func (*GrainRequest) XXX_Size

func (m *GrainRequest) XXX_Size() int

func (*GrainRequest) XXX_Unmarshal

func (m *GrainRequest) XXX_Unmarshal(b []byte) error

type GrainResponse

type GrainResponse struct {
	MessageData []byte `protobuf:"bytes,1,opt,name=message_data,json=messageData,proto3" json:"message_data,omitempty"`
}

func (*GrainResponse) Descriptor

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

func (*GrainResponse) Equal

func (this *GrainResponse) Equal(that interface{}) bool

func (*GrainResponse) GetMessageData

func (m *GrainResponse) GetMessageData() []byte

func (*GrainResponse) Marshal

func (m *GrainResponse) Marshal() (dAtA []byte, err error)

func (*GrainResponse) MarshalTo

func (m *GrainResponse) MarshalTo(dAtA []byte) (int, error)

func (*GrainResponse) MarshalToSizedBuffer

func (m *GrainResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GrainResponse) ProtoMessage

func (*GrainResponse) ProtoMessage()

func (*GrainResponse) Reset

func (m *GrainResponse) Reset()

func (*GrainResponse) Size

func (m *GrainResponse) Size() (n int)

func (*GrainResponse) String

func (this *GrainResponse) String() string

func (*GrainResponse) Unmarshal

func (m *GrainResponse) Unmarshal(dAtA []byte) error

func (*GrainResponse) XXX_DiscardUnknown

func (m *GrainResponse) XXX_DiscardUnknown()

func (*GrainResponse) XXX_Marshal

func (m *GrainResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GrainResponse) XXX_Merge

func (m *GrainResponse) XXX_Merge(src proto.Message)

func (*GrainResponse) XXX_Size

func (m *GrainResponse) XXX_Size() int

func (*GrainResponse) XXX_Unmarshal

func (m *GrainResponse) XXX_Unmarshal(b []byte) error

type HeartbeatRequest

type HeartbeatRequest struct {
}

func (*HeartbeatRequest) Descriptor

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

func (*HeartbeatRequest) Equal

func (this *HeartbeatRequest) Equal(that interface{}) bool

func (*HeartbeatRequest) Marshal

func (m *HeartbeatRequest) Marshal() (dAtA []byte, err error)

func (*HeartbeatRequest) MarshalTo

func (m *HeartbeatRequest) MarshalTo(dAtA []byte) (int, error)

func (*HeartbeatRequest) MarshalToSizedBuffer

func (m *HeartbeatRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*HeartbeatRequest) ProtoMessage

func (*HeartbeatRequest) ProtoMessage()

func (*HeartbeatRequest) Reset

func (m *HeartbeatRequest) Reset()

func (*HeartbeatRequest) Size

func (m *HeartbeatRequest) Size() (n int)

func (*HeartbeatRequest) String

func (this *HeartbeatRequest) String() string

func (*HeartbeatRequest) Unmarshal

func (m *HeartbeatRequest) Unmarshal(dAtA []byte) error

func (*HeartbeatRequest) XXX_DiscardUnknown

func (m *HeartbeatRequest) XXX_DiscardUnknown()

func (*HeartbeatRequest) XXX_Marshal

func (m *HeartbeatRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HeartbeatRequest) XXX_Merge

func (m *HeartbeatRequest) XXX_Merge(src proto.Message)

func (*HeartbeatRequest) XXX_Size

func (m *HeartbeatRequest) XXX_Size() int

func (*HeartbeatRequest) XXX_Unmarshal

func (m *HeartbeatRequest) XXX_Unmarshal(b []byte) error

type HeartbeatResponse

type HeartbeatResponse struct {
	ActorCount uint32 `protobuf:"varint,1,opt,name=actor_count,json=actorCount,proto3" json:"actor_count,omitempty"`
}

func (*HeartbeatResponse) Descriptor

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

func (*HeartbeatResponse) Equal

func (this *HeartbeatResponse) Equal(that interface{}) bool

func (*HeartbeatResponse) GetActorCount

func (m *HeartbeatResponse) GetActorCount() uint32

func (*HeartbeatResponse) Marshal

func (m *HeartbeatResponse) Marshal() (dAtA []byte, err error)

func (*HeartbeatResponse) MarshalTo

func (m *HeartbeatResponse) MarshalTo(dAtA []byte) (int, error)

func (*HeartbeatResponse) MarshalToSizedBuffer

func (m *HeartbeatResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*HeartbeatResponse) ProtoMessage

func (*HeartbeatResponse) ProtoMessage()

func (*HeartbeatResponse) Reset

func (m *HeartbeatResponse) Reset()

func (*HeartbeatResponse) Size

func (m *HeartbeatResponse) Size() (n int)

func (*HeartbeatResponse) String

func (this *HeartbeatResponse) String() string

func (*HeartbeatResponse) Unmarshal

func (m *HeartbeatResponse) Unmarshal(dAtA []byte) error

func (*HeartbeatResponse) XXX_DiscardUnknown

func (m *HeartbeatResponse) XXX_DiscardUnknown()

func (*HeartbeatResponse) XXX_Marshal

func (m *HeartbeatResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HeartbeatResponse) XXX_Merge

func (m *HeartbeatResponse) XXX_Merge(src proto.Message)

func (*HeartbeatResponse) XXX_Size

func (m *HeartbeatResponse) XXX_Size() int

func (*HeartbeatResponse) XXX_Unmarshal

func (m *HeartbeatResponse) XXX_Unmarshal(b []byte) error

type IdentityHandoverRequest

type IdentityHandoverRequest struct {
	EventId uint64    `protobuf:"varint,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"`
	Address string    `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	Members []*Member `protobuf:"bytes,3,rep,name=members,proto3" json:"members,omitempty"`
}

request response call from Identity actor sent to each member asking what activations they hold that belong to the requester

func (*IdentityHandoverRequest) Descriptor

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

func (*IdentityHandoverRequest) Equal

func (this *IdentityHandoverRequest) Equal(that interface{}) bool

func (*IdentityHandoverRequest) GetAddress

func (m *IdentityHandoverRequest) GetAddress() string

func (*IdentityHandoverRequest) GetEventId

func (m *IdentityHandoverRequest) GetEventId() uint64

func (*IdentityHandoverRequest) GetMembers

func (m *IdentityHandoverRequest) GetMembers() []*Member

func (*IdentityHandoverRequest) Marshal

func (m *IdentityHandoverRequest) Marshal() (dAtA []byte, err error)

func (*IdentityHandoverRequest) MarshalTo

func (m *IdentityHandoverRequest) MarshalTo(dAtA []byte) (int, error)

func (*IdentityHandoverRequest) MarshalToSizedBuffer

func (m *IdentityHandoverRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*IdentityHandoverRequest) ProtoMessage

func (*IdentityHandoverRequest) ProtoMessage()

func (*IdentityHandoverRequest) Reset

func (m *IdentityHandoverRequest) Reset()

func (*IdentityHandoverRequest) Size

func (m *IdentityHandoverRequest) Size() (n int)

func (*IdentityHandoverRequest) String

func (this *IdentityHandoverRequest) String() string

func (*IdentityHandoverRequest) Unmarshal

func (m *IdentityHandoverRequest) Unmarshal(dAtA []byte) error

func (*IdentityHandoverRequest) XXX_DiscardUnknown

func (m *IdentityHandoverRequest) XXX_DiscardUnknown()

func (*IdentityHandoverRequest) XXX_Marshal

func (m *IdentityHandoverRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*IdentityHandoverRequest) XXX_Merge

func (m *IdentityHandoverRequest) XXX_Merge(src proto.Message)

func (*IdentityHandoverRequest) XXX_Size

func (m *IdentityHandoverRequest) XXX_Size() int

func (*IdentityHandoverRequest) XXX_Unmarshal

func (m *IdentityHandoverRequest) XXX_Unmarshal(b []byte) error

type IdentityHandoverResponse

type IdentityHandoverResponse struct {
	Actors []*Activation `protobuf:"bytes,1,rep,name=actors,proto3" json:"actors,omitempty"`
}

response message to the above

func (*IdentityHandoverResponse) Descriptor

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

func (*IdentityHandoverResponse) Equal

func (this *IdentityHandoverResponse) Equal(that interface{}) bool

func (*IdentityHandoverResponse) GetActors

func (m *IdentityHandoverResponse) GetActors() []*Activation

func (*IdentityHandoverResponse) Marshal

func (m *IdentityHandoverResponse) Marshal() (dAtA []byte, err error)

func (*IdentityHandoverResponse) MarshalTo

func (m *IdentityHandoverResponse) MarshalTo(dAtA []byte) (int, error)

func (*IdentityHandoverResponse) MarshalToSizedBuffer

func (m *IdentityHandoverResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*IdentityHandoverResponse) ProtoMessage

func (*IdentityHandoverResponse) ProtoMessage()

func (*IdentityHandoverResponse) Reset

func (m *IdentityHandoverResponse) Reset()

func (*IdentityHandoverResponse) Size

func (m *IdentityHandoverResponse) Size() (n int)

func (*IdentityHandoverResponse) String

func (this *IdentityHandoverResponse) String() string

func (*IdentityHandoverResponse) Unmarshal

func (m *IdentityHandoverResponse) Unmarshal(dAtA []byte) error

func (*IdentityHandoverResponse) XXX_DiscardUnknown

func (m *IdentityHandoverResponse) XXX_DiscardUnknown()

func (*IdentityHandoverResponse) XXX_Marshal

func (m *IdentityHandoverResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*IdentityHandoverResponse) XXX_Merge

func (m *IdentityHandoverResponse) XXX_Merge(src proto.Message)

func (*IdentityHandoverResponse) XXX_Size

func (m *IdentityHandoverResponse) XXX_Size() int

func (*IdentityHandoverResponse) XXX_Unmarshal

func (m *IdentityHandoverResponse) XXX_Unmarshal(b []byte) error

type IdentityLookup

type IdentityLookup interface {
	Get(clusterIdentity *ClusterIdentity)
	RemovePid(clusterIdentity *ClusterIdentity, pid *actor.PID)
	Setup(cluster *Cluster, kinds []string, isClient bool)
	Shutdown()
}

type Informer

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

The Informer data structure implements the Gossip interface

func (*Informer) AddConsensusCheck

func (inf *Informer) AddConsensusCheck(id string, check *ConsensusCheck)

adds a new consensus checker to this informer

func (*Informer) CheckConsensus

func (inf *Informer) CheckConsensus(updatedKeys ...string)

check consensus for the given keys

func (*Informer) GetMemberStateDelta

func (inf *Informer) GetMemberStateDelta(targetMemberID string) MemberStateDelta

func (*Informer) GetState

func (inf *Informer) GetState(key string) map[string]*types.Any

retrieves this informer current state for the given key

func (*Informer) ReceiveState

func (inf *Informer) ReceiveState(remoteState *GossipState) []*GossipUpdate

receives a remote informer state

func (*Informer) RemoveConsensusCheck

func (inf *Informer) RemoveConsensusCheck(id string)

removes a consensus checker from this informer

func (*Informer) SendState

func (inf *Informer) SendState(sendStateToMember LocalStateSender)

sends this informer local state to remote informers chosen randomly from the slice of other members known by this informer until gossipFanOut number of sent has been reached

func (*Informer) SetState

func (inf *Informer) SetState(key string, message proto.Message)

sets new update key state using the given proto message

func (*Informer) UpdateClusterTopology

func (inf *Informer) UpdateClusterTopology(topology *ClusterTopology)

called when there is a cluster topology update

type Kind

type Kind struct {
	Kind  string
	Props *actor.Props
}

func NewKind

func NewKind(kind string, props *actor.Props) *Kind

type LocalStateSender

type LocalStateSender func(memberStateDelta *MemberStateDelta, member *Member)

customary type that defines a states sender callback

type Member

type Member struct {
	Host  string   `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	Port  int32    `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	Id    string   `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
	Kinds []string `protobuf:"bytes,4,rep,name=kinds,proto3" json:"kinds,omitempty"`
}

func (*Member) Address

func (m *Member) Address() string

Address return a "host:port". Member defined by protos.proto

func (*Member) Descriptor

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

func (*Member) Equal

func (this *Member) Equal(that interface{}) bool

func (*Member) GetHost

func (m *Member) GetHost() string

func (*Member) GetId

func (m *Member) GetId() string

func (*Member) GetKinds

func (m *Member) GetKinds() []string

func (*Member) GetPort

func (m *Member) GetPort() int32

func (*Member) Marshal

func (m *Member) Marshal() (dAtA []byte, err error)

func (*Member) MarshalTo

func (m *Member) MarshalTo(dAtA []byte) (int, error)

func (*Member) MarshalToSizedBuffer

func (m *Member) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Member) ProtoMessage

func (*Member) ProtoMessage()

func (*Member) Reset

func (m *Member) Reset()

func (*Member) Size

func (m *Member) Size() (n int)

func (*Member) String

func (this *Member) String() string

func (*Member) Unmarshal

func (m *Member) Unmarshal(dAtA []byte) error

func (*Member) XXX_DiscardUnknown

func (m *Member) XXX_DiscardUnknown()

func (*Member) XXX_Marshal

func (m *Member) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Member) XXX_Merge

func (m *Member) XXX_Merge(src proto.Message)

func (*Member) XXX_Size

func (m *Member) XXX_Size() int

func (*Member) XXX_Unmarshal

func (m *Member) XXX_Unmarshal(b []byte) error

type MemberAvailableEvent

type MemberAvailableEvent struct {
	MemberMeta
}

func (*MemberAvailableEvent) MemberStatusEvent

func (*MemberAvailableEvent) MemberStatusEvent()

type MemberHeartbeat

type MemberHeartbeat struct {
}

func (*MemberHeartbeat) Descriptor

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

func (*MemberHeartbeat) Equal

func (this *MemberHeartbeat) Equal(that interface{}) bool

func (*MemberHeartbeat) Marshal

func (m *MemberHeartbeat) Marshal() (dAtA []byte, err error)

func (*MemberHeartbeat) MarshalTo

func (m *MemberHeartbeat) MarshalTo(dAtA []byte) (int, error)

func (*MemberHeartbeat) MarshalToSizedBuffer

func (m *MemberHeartbeat) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MemberHeartbeat) ProtoMessage

func (*MemberHeartbeat) ProtoMessage()

func (*MemberHeartbeat) Reset

func (m *MemberHeartbeat) Reset()

func (*MemberHeartbeat) Size

func (m *MemberHeartbeat) Size() (n int)

func (*MemberHeartbeat) String

func (this *MemberHeartbeat) String() string

func (*MemberHeartbeat) Unmarshal

func (m *MemberHeartbeat) Unmarshal(dAtA []byte) error

func (*MemberHeartbeat) XXX_DiscardUnknown

func (m *MemberHeartbeat) XXX_DiscardUnknown()

func (*MemberHeartbeat) XXX_Marshal

func (m *MemberHeartbeat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MemberHeartbeat) XXX_Merge

func (m *MemberHeartbeat) XXX_Merge(src proto.Message)

func (*MemberHeartbeat) XXX_Size

func (m *MemberHeartbeat) XXX_Size() int

func (*MemberHeartbeat) XXX_Unmarshal

func (m *MemberHeartbeat) XXX_Unmarshal(b []byte) error

type MemberJoinedEvent

type MemberJoinedEvent struct {
	MemberMeta
}

func (*MemberJoinedEvent) MemberStatusEvent

func (*MemberJoinedEvent) MemberStatusEvent()

type MemberLeftEvent

type MemberLeftEvent struct {
	MemberMeta
}

func (*MemberLeftEvent) MemberStatusEvent

func (*MemberLeftEvent) MemberStatusEvent()

type MemberList

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

MemberList is responsible to keep track of the current cluster topology it does so by listening to changes from the ClusterProvider. the default ClusterProvider is consul.ConsulProvider which uses the Consul HTTP API to scan for changes

func NewMemberList

func NewMemberList(cluster *Cluster) *MemberList

func (*MemberList) BroadcastEvent

func (ml *MemberList) BroadcastEvent(message interface{})

func (*MemberList) ContainsMemberID

func (ml *MemberList) ContainsMemberID(memberID string) bool

func (*MemberList) InitializeTopologyConsensus

func (ml *MemberList) InitializeTopologyConsensus()

func (*MemberList) Length

func (ml *MemberList) Length() int

func (*MemberList) TopologyConsensus

func (ml *MemberList) TopologyConsensus(ctx context.Context) (uint64, bool)

func (*MemberList) UpdateClusterTopology

func (ml *MemberList) UpdateClusterTopology(members []*Member, eventId uint64)

type MemberMeta

type MemberMeta struct {
	Host  string
	Port  int
	Kinds []string
}

func (*MemberMeta) GetKinds

func (e *MemberMeta) GetKinds() []string

func (*MemberMeta) Name

func (e *MemberMeta) Name() string

type MemberRejoinedEvent

type MemberRejoinedEvent struct {
	MemberMeta
}

func (*MemberRejoinedEvent) MemberStatusEvent

func (*MemberRejoinedEvent) MemberStatusEvent()

type MemberStateDelta

type MemberStateDelta struct {
	TargetMemberID string
	HasState       bool
	State          *GossipState
	CommitOffsets  func()
}

type MemberStatus

type MemberStatus struct {
	Member
	MemberID string // for compatibility
	Alive    bool
}

func (*MemberStatus) Address

func (m *MemberStatus) Address() string

type MemberStatusEvent

type MemberStatusEvent interface {
	MemberStatusEvent()
	GetKinds() []string
}

type MemberStrategy

type MemberStrategy interface {
	GetAllMembers() []*Member
	// AddMember(member *Member)
	// UpdateMember(member *Member)
	// RemoveMember(member *Member)
	GetPartition(key string) string
	GetActivator() string
}

type MemberUnavailableEvent

type MemberUnavailableEvent struct {
	MemberMeta
}

func (*MemberUnavailableEvent) MemberStatusEvent

func (*MemberUnavailableEvent) MemberStatusEvent()

type Option

type Option func(g *Gossiper)

type PartitionKind

type PartitionKind struct {
	Kind string
	// contains filtered or unexported fields
}

func (*PartitionKind) PidOfIdentityActor

func (pm *PartitionKind) PidOfIdentityActor(addr string) *actor.PID

PidOfIdentityActor ...

func (*PartitionKind) PidOfPlacementActor

func (pm *PartitionKind) PidOfPlacementActor(addr string) *actor.PID

PidOfPlacementActor ...

type PartitionManager

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

func (*PartitionManager) PidOfIdentityActor

func (pm *PartitionManager) PidOfIdentityActor(kind, addr string) *actor.PID

PidOfIdentityActor ...

func (*PartitionManager) Start

func (pm *PartitionManager) Start()

Start ...

func (*PartitionManager) Stop

func (pm *PartitionManager) Stop()

Stop ...

type RemoveConsensusCheck

type RemoveConsensusCheck struct {
	ID string
}

Mimic .NET ReenterAfterCancellation on GossipActor

func NewRemoveConsensusCheck

func NewRemoveConsensusCheck(id string) RemoveConsensusCheck

type Rendezvous

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

func NewRendezvous

func NewRendezvous(memberStrategy MemberStrategy) *Rendezvous

func (*Rendezvous) GetByRdv

func (r *Rendezvous) GetByRdv(key string) string

Get returns the node with the highest score for the given key. If this Hash has no nodes, an empty string is returned.

func (*Rendezvous) UpdateRdv

func (r *Rendezvous) UpdateRdv()

type RendezvousV2

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

RendezvousV2 ...

func NewRendezvousV2

func NewRendezvousV2(members []*Member) *RendezvousV2

NewRendezvousV2 ...

func (*RendezvousV2) Get

func (r *RendezvousV2) Get(key string) string

Get ...

type SendGossipStateRequest

type SendGossipStateRequest struct{}

type SendGossipStateResponse

type SendGossipStateResponse struct{}

type SetGossipStateKey

type SetGossipStateKey struct {
	Key   string
	Value proto.Message
}

Used to setup Gossip Status Keys in the GossipActor

func NewGossipStateKey

func NewGossipStateKey(key string, value proto.Message) SetGossipStateKey

Create a new SetGossipStateKey value with the given data and return it back

type SetGossipStateResponse

type SetGossipStateResponse struct{}

Used by the GossipActor to respond SetGossipStatus requests

type SimpleRoundRobin

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

func NewSimpleRoundRobin

func NewSimpleRoundRobin(memberStrategy MemberStrategy) *SimpleRoundRobin

func (*SimpleRoundRobin) GetByRoundRobin

func (r *SimpleRoundRobin) GetByRoundRobin() string

type TakeOwnership

type TakeOwnership struct {
	Pid  *actor.PID `protobuf:"bytes,1,opt,name=pid,proto3" json:"pid,omitempty"`
	Name string     `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
}

func (*TakeOwnership) Descriptor

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

func (*TakeOwnership) Equal

func (this *TakeOwnership) Equal(that interface{}) bool

func (*TakeOwnership) GetName

func (m *TakeOwnership) GetName() string

func (*TakeOwnership) GetPid

func (m *TakeOwnership) GetPid() *actor.PID

func (*TakeOwnership) Marshal

func (m *TakeOwnership) Marshal() (dAtA []byte, err error)

func (*TakeOwnership) MarshalTo

func (m *TakeOwnership) MarshalTo(dAtA []byte) (int, error)

func (*TakeOwnership) MarshalToSizedBuffer

func (m *TakeOwnership) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TakeOwnership) ProtoMessage

func (*TakeOwnership) ProtoMessage()

func (*TakeOwnership) Reset

func (m *TakeOwnership) Reset()

func (*TakeOwnership) Size

func (m *TakeOwnership) Size() (n int)

func (*TakeOwnership) String

func (this *TakeOwnership) String() string

func (*TakeOwnership) Unmarshal

func (m *TakeOwnership) Unmarshal(dAtA []byte) error

func (*TakeOwnership) XXX_DiscardUnknown

func (m *TakeOwnership) XXX_DiscardUnknown()

func (*TakeOwnership) XXX_Marshal

func (m *TakeOwnership) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TakeOwnership) XXX_Merge

func (m *TakeOwnership) XXX_Merge(src proto.Message)

func (*TakeOwnership) XXX_Size

func (m *TakeOwnership) XXX_Size() int

func (*TakeOwnership) XXX_Unmarshal

func (m *TakeOwnership) XXX_Unmarshal(b []byte) error

type TopologyEvent

type TopologyEvent []*Member

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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