router

package
v0.0.0-...-13cb2e0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthProtos = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowProtos   = fmt.Errorf("proto: integer overflow")
)

Functions

func NewBroadcastGroup

func NewBroadcastGroup(routees ...*actor.PID) *actor.Props

func NewBroadcastPool

func NewBroadcastPool(size int) *actor.Props

func NewConsistentHashGroup

func NewConsistentHashGroup(routees ...*actor.PID) *actor.Props

func NewConsistentHashPool

func NewConsistentHashPool(size int) *actor.Props

func NewRandomGroup

func NewRandomGroup(routees ...*actor.PID) *actor.Props

func NewRandomPool

func NewRandomPool(size int) *actor.Props

func NewRoundRobinGroup

func NewRoundRobinGroup(routees ...*actor.PID) *actor.Props

func NewRoundRobinPool

func NewRoundRobinPool(size int) *actor.Props

Types

type AddRoutee

type AddRoutee struct {
	PID *actor.PID `protobuf:"bytes,1,opt,name=PID" json:"PID,omitempty"`
}

func (*AddRoutee) Descriptor

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

func (*AddRoutee) Equal

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

func (*AddRoutee) GetPID

func (m *AddRoutee) GetPID() *actor.PID

func (*AddRoutee) GoString

func (this *AddRoutee) GoString() string

func (*AddRoutee) ManagementMessage

func (*AddRoutee) ManagementMessage()

func (*AddRoutee) Marshal

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

func (*AddRoutee) MarshalTo

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

func (*AddRoutee) ProtoMessage

func (*AddRoutee) ProtoMessage()

func (*AddRoutee) Reset

func (m *AddRoutee) Reset()

func (*AddRoutee) Size

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

func (*AddRoutee) String

func (this *AddRoutee) String() string

func (*AddRoutee) Unmarshal

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

type AdjustPoolSize

type AdjustPoolSize struct {
	Change int32 `protobuf:"varint,1,opt,name=change,proto3" json:"change,omitempty"`
}

func (*AdjustPoolSize) Descriptor

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

func (*AdjustPoolSize) Equal

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

func (*AdjustPoolSize) GoString

func (this *AdjustPoolSize) GoString() string

func (*AdjustPoolSize) ManagementMessage

func (*AdjustPoolSize) ManagementMessage()

func (*AdjustPoolSize) Marshal

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

func (*AdjustPoolSize) MarshalTo

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

func (*AdjustPoolSize) ProtoMessage

func (*AdjustPoolSize) ProtoMessage()

func (*AdjustPoolSize) Reset

func (m *AdjustPoolSize) Reset()

func (*AdjustPoolSize) Size

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

func (*AdjustPoolSize) String

func (this *AdjustPoolSize) String() string

func (*AdjustPoolSize) Unmarshal

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

type BroadcastMessage

type BroadcastMessage struct {
	Message interface{}
}

func (*BroadcastMessage) ManagementMessage

func (*BroadcastMessage) ManagementMessage()

type GetRoutees

type GetRoutees struct {
}

func (*GetRoutees) Descriptor

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

func (*GetRoutees) Equal

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

func (*GetRoutees) GoString

func (this *GetRoutees) GoString() string

func (*GetRoutees) ManagementMessage

func (*GetRoutees) ManagementMessage()

func (*GetRoutees) Marshal

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

func (*GetRoutees) MarshalTo

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

func (*GetRoutees) ProtoMessage

func (*GetRoutees) ProtoMessage()

func (*GetRoutees) Reset

func (m *GetRoutees) Reset()

func (*GetRoutees) Size

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

func (*GetRoutees) String

func (this *GetRoutees) String() string

func (*GetRoutees) Unmarshal

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

type GroupRouter

type GroupRouter struct {
	Routees *actor.PIDSet
}

func (*GroupRouter) OnStarted

func (config *GroupRouter) OnStarted(context actor.Context, props *actor.Props, router Interface)

func (*GroupRouter) RouterType

func (config *GroupRouter) RouterType() RouterType

type Hasher

type Hasher interface {
	Hash() string
}

type Interface

type Interface interface {
	RouteMessage(message interface{}, sender *actor.PID)
	SetRoutees(routees *actor.PIDSet)
	GetRoutees() *actor.PIDSet
}

A type that satisfies router.Interface can be used as a router

type ManagementMessage

type ManagementMessage interface {
	ManagementMessage()
}

type PoolRouter

type PoolRouter struct {
	PoolSize int
}

func (*PoolRouter) OnStarted

func (config *PoolRouter) OnStarted(context actor.Context, props *actor.Props, router Interface)

func (*PoolRouter) RouterType

func (config *PoolRouter) RouterType() RouterType

type RemoveRoutee

type RemoveRoutee struct {
	PID *actor.PID `protobuf:"bytes,1,opt,name=PID" json:"PID,omitempty"`
}

func (*RemoveRoutee) Descriptor

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

func (*RemoveRoutee) Equal

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

func (*RemoveRoutee) GetPID

func (m *RemoveRoutee) GetPID() *actor.PID

func (*RemoveRoutee) GoString

func (this *RemoveRoutee) GoString() string

func (*RemoveRoutee) ManagementMessage

func (*RemoveRoutee) ManagementMessage()

func (*RemoveRoutee) Marshal

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

func (*RemoveRoutee) MarshalTo

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

func (*RemoveRoutee) ProtoMessage

func (*RemoveRoutee) ProtoMessage()

func (*RemoveRoutee) Reset

func (m *RemoveRoutee) Reset()

func (*RemoveRoutee) Size

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

func (*RemoveRoutee) String

func (this *RemoveRoutee) String() string

func (*RemoveRoutee) Unmarshal

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

type Routees

type Routees struct {
	PIDs []*actor.PID `protobuf:"bytes,1,rep,name=PIDs" json:"PIDs,omitempty"`
}

func (*Routees) Descriptor

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

func (*Routees) Equal

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

func (*Routees) GetPIDs

func (m *Routees) GetPIDs() []*actor.PID

func (*Routees) GoString

func (this *Routees) GoString() string

func (*Routees) Marshal

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

func (*Routees) MarshalTo

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

func (*Routees) ProtoMessage

func (*Routees) ProtoMessage()

func (*Routees) Reset

func (m *Routees) Reset()

func (*Routees) Size

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

func (*Routees) String

func (this *Routees) String() string

func (*Routees) Unmarshal

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

type RouterConfig

type RouterConfig interface {
	RouterType() RouterType
	OnStarted(context actor.Context, props *actor.Props, router Interface)
	CreateRouterState() Interface
}

type RouterType

type RouterType int
const (
	GroupRouterType RouterType = iota
	PoolRouterType
)

Jump to

Keyboard shortcuts

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