gosiris

package
v0.0.0-...-ca06569 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GosirisMsgPoisonPill       = "gosirisPoisonPill"
	GosirisMsgChildClosed      = "gosirisChildClosed"
	GosirisMsgHeartbeatRequest = "gosirisHeartbeatRequest"
	GosirisMsgHeartbeatReply   = "gosirisHeartbeatReply"
)

Variables

View Source
var Amqp = "amqp"
View Source
var ErrorLogger *log.Logger
View Source
var FatalLogger *log.Logger
View Source
var InfoLogger *log.Logger
View Source
var Kafka = "kafka"

Functions

func ActorSystem

func ActorSystem() *actorSystem

func AddConnection

func AddConnection(name string, conf OptionsInterface)

func CloseActorSystem

func CloseActorSystem() error

func DeleteRemoteActorConnection

func DeleteRemoteActorConnection(name string) error

func InitActorSystem

func InitActorSystem(options SystemOptions) error

func InitRemoteConnections

func InitRemoteConnections(configuration map[string]OptionsInterface)

func NewActorLogger

func NewActorLogger(name string) (*log.Logger, *log.Logger)

Types

type Actor

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

func RootActor

func RootActor() *Actor

func (*Actor) Close

func (actor *Actor) Close()

func (*Actor) Name

func (actor *Actor) Name() string

func (*Actor) Parent

func (actor *Actor) Parent() ActorRefInterface

func (*Actor) React

func (actor *Actor) React(messageType string, f func(Context)) *Actor

func (*Actor) String

func (actor *Actor) String() string

type ActorOptions

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

func (*ActorOptions) Autoclose

func (options *ActorOptions) Autoclose() bool

func (*ActorOptions) BufferSize

func (options *ActorOptions) BufferSize() int

func (*ActorOptions) DefaultWatcher

func (options *ActorOptions) DefaultWatcher() time.Duration

func (*ActorOptions) Destination

func (options *ActorOptions) Destination() string

func (*ActorOptions) Parent

func (options *ActorOptions) Parent() string

func (*ActorOptions) Remote

func (options *ActorOptions) Remote() bool

func (*ActorOptions) RemoteType

func (options *ActorOptions) RemoteType() string

func (*ActorOptions) SetAutoclose

func (options *ActorOptions) SetAutoclose(b bool) OptionsInterface

func (*ActorOptions) SetBufferSize

func (options *ActorOptions) SetBufferSize(i int) OptionsInterface

func (*ActorOptions) SetDefaultWatcher

func (options *ActorOptions) SetDefaultWatcher(d time.Duration) OptionsInterface

func (*ActorOptions) SetDestination

func (options *ActorOptions) SetDestination(s string) OptionsInterface

func (*ActorOptions) SetRemote

func (options *ActorOptions) SetRemote(b bool) OptionsInterface

func (*ActorOptions) SetRemoteType

func (options *ActorOptions) SetRemoteType(s string) OptionsInterface

func (*ActorOptions) SetUrl

func (options *ActorOptions) SetUrl(s string) OptionsInterface

func (*ActorOptions) Url

func (options *ActorOptions) Url() string

type ActorRef

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

func (ActorRef) AskForClose

func (ref ActorRef) AskForClose(sender ActorRefInterface)

func (ActorRef) Become

func (ref ActorRef) Become(messageType string, f func(Context)) error

func (ActorRef) Forward

func (ref ActorRef) Forward(context Context, destinations ...string)

func (ActorRef) LogError

func (ref ActorRef) LogError(context Context, format string, a ...interface{})

func (ActorRef) LogInfo

func (ref ActorRef) LogInfo(context Context, format string, a ...interface{})

func (ActorRef) Name

func (ref ActorRef) Name() string

func (ActorRef) Repeat

func (ref ActorRef) Repeat(messageType string, d time.Duration, data interface{}, sender ActorRefInterface) (chan struct{}, error)

func (ActorRef) Tell

func (ref ActorRef) Tell(context Context, messageType string, data interface{}, sender ActorRefInterface) error

func (ActorRef) Unbecome

func (ref ActorRef) Unbecome(messageType string) error

type ActorRefInterface

type ActorRefInterface interface {
	Tell(Context, string, interface{}, ActorRefInterface) error
	Repeat(string, time.Duration, interface{}, ActorRefInterface) (chan struct{}, error)
	AskForClose(ActorRefInterface)
	LogInfo(Context, string, ...interface{})
	LogError(Context, string, ...interface{})
	Become(string, func(Context)) error
	Unbecome(string) error
	Name() string
	Forward(Context, ...string)
}

type Context

type Context struct {
	MessageType string
	Data        interface{}
	Sender      ActorRefInterface
	Self        ActorRefInterface
	// contains filtered or unexported fields
}
var (
	EmptyContext Context = Context{}
)

func (Context) MarshalJSON

func (context Context) MarshalJSON() ([]byte, error)

func (*Context) UnmarshalJSON

func (context *Context) UnmarshalJSON(b []byte) error

type OptionsInterface

type OptionsInterface interface {
	SetUrl(string) OptionsInterface
	SetRemote(bool) OptionsInterface
	SetAutoclose(bool) OptionsInterface
	Remote() bool
	Autoclose() bool
	SetRemoteType(string) OptionsInterface
	RemoteType() string
	Url() string
	SetDestination(string) OptionsInterface
	Destination() string

	Parent() string
	SetBufferSize(int) OptionsInterface
	BufferSize() int
	SetDefaultWatcher(time.Duration) OptionsInterface
	DefaultWatcher() time.Duration
	// contains filtered or unexported methods
}

TODO No interface

type RemoteActor

type RemoteActor struct {
	Actor
}

type SystemOptions

type SystemOptions struct {
	ActorSystemName string
	ZipkinOptions   ZipkinOptions
	RegistryUrl     string
}

type TransportInterface

type TransportInterface interface {
	Configure(string, map[string]string)
	Connection() error
	Send(string, []byte) error
	Receive(string)
	Close()
}

func RemoteConnection

func RemoteConnection(name string) (TransportInterface, error)

type ZipkinOptions

type ZipkinOptions struct {
	Url      string
	Debug    bool
	HostPort string
	SameSpan bool
}

Jump to

Keyboard shortcuts

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