battery

package module
v0.0.0-...-2715f90 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

README

goactor

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(err error, code string, metadata ...map[string]string) *errors.Error

Error creates a new error with a code, message and metadata

func GetLOGO() string

func Version

func Version() string

Types

type Application

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

func NewApp

func NewApp(opts ...Option) *Application

func (*Application) Decoder

func (app *Application) Decoder() facade.PacketDecoder

func (*Application) DieChan

func (app *Application) DieChan() chan bool

func (*Application) Encoder

func (app *Application) Encoder() facade.PacketEncoder

func (*Application) IsFrontend

func (app *Application) IsFrontend() bool

func (*Application) IsRunning

func (app *Application) IsRunning() bool

func (*Application) MessageEncoder

func (app *Application) MessageEncoder() facade.MessageEncoder

func (*Application) NodeMode

func (app *Application) NodeMode() ServerMode

func (*Application) Register

func (app *Application) Register(s facade.Service)

func (*Application) Serializer

func (app *Application) Serializer() facade.Serializer

func (*Application) Shutdown

func (app *Application) Shutdown()

func (*Application) Start

func (app *Application) Start()

type Option

type Option func(app *Application) error

Option is a function on the options for a connection.

func WithClusterMode

func WithClusterMode() Option

func WithDebug

func WithDebug() Option

func WithGate

func WithGate(acceptors []facade.Acceptors) Option

type ServerMode

type ServerMode byte

ServerMode represents a server mode

const (

	// Cluster represents a server running with connection to other servers
	Cluster ServerMode
	// Standalone represents a server running without connection to other servers
	Standalone
)

Directories

Path Synopsis
_examples
chat command
child command
helloworld command
middleware command
request command
router command
net
message/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
queue
mpsc
Package mpsc provides an efficient implementation of a multi-producer, single-consumer lock-free queue.
Package mpsc provides an efficient implementation of a multi-producer, single-consumer lock-free queue.

Jump to

Keyboard shortcuts

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