Documentation
¶
Index ¶
- Variables
- func CheckImplements(atype reflect.Type, btype reflect.Type) bool
- func CheckImplementsOneOf(atype reflect.Type, types ...reflect.Type) bool
- func CheckIn(ftype reflect.Type, params ...reflect.Type) bool
- func CheckOut(ftype reflect.Type, params ...reflect.Type) bool
- func CompareType(atype reflect.Type, btype reflect.Type) bool
- func GenerateName() string
- func IsActorContextType(gtype reflect.Type) bool
- func IsErrorType(gtype reflect.Type) bool
- func IsMessageType(gtype reflect.Type) bool
- func MethodByName(v interface{}, name string) (reflect.Value, bool)
- func PostStopFunc(v interface{}) func(ActorContext) error
- func PostStopMethod(v interface{}) (reflect.Value, bool)
- func PreStartFunc(v interface{}) func(ActorContext) error
- func PreStartMethod(v interface{}) (reflect.Value, bool)
- func PtrValue(gvalue reflect.Value) reflect.Value
- type Actor
- type ActorContext
- type ActorExecutor
- type ActorHandler
- type ActorHandlerExecutor
- type AsyncActor
- type Cache
- type Error
- type HandlerSettings
- type Logger
- type Message
- type NamedActor
- type Option
- func (opt Option) Bool() (bool, bool)
- func (opt Option) Float32() (float32, bool)
- func (opt Option) Float64() (float64, bool)
- func (opt Option) Int() (int, bool)
- func (opt Option) Int8() (int8, bool)
- func (opt Option) Int16() (int16, bool)
- func (opt Option) Int32() (int32, bool)
- func (opt Option) Int64() (int64, bool)
- func (opt Option) String() string
- func (opt Option) Uint() (uint, bool)
- func (opt Option) Uint8() (uint8, bool)
- func (opt Option) Uint16() (uint16, bool)
- func (opt Option) Uint32() (uint32, bool)
- func (opt Option) Uint64() (uint64, bool)
- type Pusher
- type Receiver
- type ReceiverFunc
- type Ref
- type ServiceExecutor
- type Startable
- type Stopable
- type System
- type SystemSettings
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CheckImplementsOneOf ¶
func GenerateName ¶ added in v0.1.0
func GenerateName() string
func IsActorContextType ¶
func IsErrorType ¶
func IsMessageType ¶
func PostStopFunc ¶
func PostStopFunc(v interface{}) func(ActorContext) error
func PostStopMethod ¶
func PreStartFunc ¶
func PreStartFunc(v interface{}) func(ActorContext) error
func PreStartMethod ¶
Types ¶
type Actor ¶
type Actor struct {
Name string
OnReceive func(ActorContext, Message)
OnStart func(ActorContext) error
OnStop func(ActorContext) error
Async bool
}
func (Actor) AsyncActor ¶
func (Actor) PostStop ¶
func (a Actor) PostStop(ctx ActorContext) error
func (Actor) PreStart ¶
func (a Actor) PreStart(ctx ActorContext) error
func (Actor) Receive ¶
func (a Actor) Receive(ctx ActorContext, msg Message)
type ActorContext ¶
type ActorHandler ¶
type ActorHandler interface {
Pusher
ActorHandlerExecutor
Name() string
Close()
Root() ActorHandler
Parent() (ActorHandler, bool)
System() System
Log() Logger
Child(string) (ActorHandler, bool)
Children() []ActorHandler
CreateRef() Ref
Cache() Cache
}
type ActorHandlerExecutor ¶
type ActorHandlerExecutor interface {
ExecuteHandler(Receiver, ...Option) (ActorHandler, error)
}
type AsyncActor ¶
type AsyncActor interface {
AsyncActor() bool
}
type Cache ¶
type Error ¶
type Error struct {
Code string `json:"code,omitempty"`
Message string `json:"error"`
Description string `json:"description,omitempty"`
Status int `json:"-"`
}
func (*Error) StatusCode ¶
func (*Error) WithDescription ¶
func (*Error) WithStatusCode ¶
type HandlerSettings ¶ added in v0.1.0
type Logger ¶
type Logger interface {
ForName(string) Logger
Debug(...interface{})
Info(...interface{})
Warn(...interface{})
Error(...interface{})
Fatal(...interface{})
Panic(...interface{})
Debugf(string, ...interface{})
Infof(string, ...interface{})
Warnf(string, ...interface{})
Errorf(string, ...interface{})
Fatalf(string, ...interface{})
Panicf(string, ...interface{})
}
func NewSysLogger ¶ added in v0.1.0
type NamedActor ¶ added in v0.1.0
type NamedActor interface {
ActorName() string
}
type Option ¶
type Option struct {
Name string
Value interface{}
}
func MessageQueue ¶
func NoSignature ¶
func NoSignature() Option
func WorkerPool ¶
type Receiver ¶
type Receiver interface {
Receive(ActorContext, Message)
}
type ReceiverFunc ¶
type ReceiverFunc func(ActorContext, Message)
func (ReceiverFunc) Receive ¶
func (f ReceiverFunc) Receive(ctx ActorContext, msg Message)
type Ref ¶
type ServiceExecutor ¶
type ServiceExecutor interface {
ExecuteService(Receiver, ...Option) (ActorHandler, error)
}
type Startable ¶
type Startable interface {
PreStart(ActorContext) error
}
type Stopable ¶
type Stopable interface {
PostStop(ActorContext) error
}
type System ¶
type SystemSettings ¶
type SystemSettings struct {
NoSignature bool
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.