Documentation
¶
Index ¶
- Constants
- func DefaultGorillaHub(ctx context.Context, logger sabuhp.Logger, codec sabuhp.Codec, ...) (*gorillapub.GorillaHub, sabuhp.Handler, error)
- func DefaultHTTPServer(_ context.Context, _ sabuhp.Logger, router *radar.Mux) (*serverpub.Server, error)
- func DefaultInjector(_ context.Context, _ sabuhp.Logger, _ *nenv.EnvStore) (*injectors.Injector, error)
- func DefaultLocalMailerTransport(ctx context.Context, logger sabuhp.Logger, _ sabuhp.Codec) (sabuhp.Transport, error)
- func DefaultManager(ctx context.Context, id string, logger sabuhp.Logger, codec sabuhp.Codec, ...) (*managers.Manager, error)
- func DefaultRedisTransport(ctx context.Context, logger sabuhp.Logger, codec sabuhp.Codec) (sabuhp.Transport, error)
- func DefaultRedisTransportWithOptions(ctx context.Context, logger sabuhp.Logger, codec sabuhp.Codec, ...) (sabuhp.Transport, error)
- func DefaultRouter(ctx context.Context, logger sabuhp.Logger, manager *managers.Manager, ...) (*radar.Mux, error)
- func DefaultRouterWithNotFound(ctx context.Context, logger sabuhp.Logger, manager *managers.Manager, ...) (*radar.Mux, error)
- func DefaultSSEServer(ctx context.Context, logger sabuhp.Logger, codec sabuhp.Codec, ...) (*ssepub.SSEServer, error)
- func DefaultTranslator(_ context.Context, logger sabuhp.Logger, codec sabuhp.Codec) (sabuhp.Translator, error)
- func DefaultTransposer(_ context.Context, logger sabuhp.Logger, codec sabuhp.Codec, maxSize int64) (sabuhp.Transposer, error)
- func DefaultWorkerHub(ctx context.Context, logger sabuhp.Logger, injector *injectors.Injector, ...) (*actions.ActionHub, error)
- func DefaultWorkerHubWithEscalation(ctx context.Context, logger sabuhp.Logger, injector *injectors.Injector, ...) (*actions.ActionHub, error)
- func GobCodec(_ context.Context, _ sabuhp.Logger) (sabuhp.Codec, error)
- func JsonCodec(_ context.Context, _ sabuhp.Logger) (sabuhp.Codec, error)
- func MessagePackCodec(_ context.Context, _ sabuhp.Logger) (sabuhp.Codec, error)
- type CodecCreator
- type EnvConfigCreator
- type GorillaHubCreator
- type HttpServerCreator
- type InjectorCreator
- type ManagerCreator
- type RouterCreator
- type SSEServerCreator
- type Station
- func DefaultLocalTransportStation(ctx context.Context, id string, addr string, logger sabuhp.Logger, ...) *Station
- func DefaultStation(ctx context.Context, id string, addr string, logger sabuhp.Logger, ...) *Station
- func NewStation(ctx context.Context, id string, addr string, logger sabuhp.Logger, ...) *Station
- func (s *Station) Codec() sabuhp.Codec
- func (s *Station) EnvConfig() *nenv.EnvStore
- func (s *Station) HttpHealth() serverpub.HealthPinger
- func (s *Station) HttpServer() *serverpub.Server
- func (s *Station) Init() error
- func (s *Station) Injector() *injectors.Injector
- func (s *Station) Manager() *managers.Manager
- func (s *Station) Router() *radar.Mux
- func (s *Station) SSEServer() *ssepub.SSEServer
- func (s *Station) Translator() sabuhp.Translator
- func (s *Station) Transport() sabuhp.Transport
- func (s *Station) Transposer() sabuhp.Transposer
- func (s *Station) Wait() error
- func (s *Station) WebsocketHandler() sabuhp.Handler
- func (s *Station) WebsocketHub() *gorillapub.GorillaHub
- func (s *Station) Workers() *actions.ActionHub
- type TranslatorCreator
- type TransportCreator
- type TransposerCreator
- type WorkerHubCreator
Constants ¶
View Source
const (
DefaultMaxSize = 4096
)
Variables ¶
This section is empty.
Functions ¶
func DefaultGorillaHub ¶
func DefaultHTTPServer ¶
func DefaultInjector ¶ added in v0.2.1
func DefaultManager ¶
func DefaultRedisTransport ¶
func DefaultRouter ¶
func DefaultSSEServer ¶
func DefaultTranslator ¶ added in v0.1.4
func DefaultTransposer ¶
func DefaultWorkerHub ¶
Types ¶
type CodecCreator ¶
type EnvConfigCreator ¶ added in v0.2.4
func DefaultEnvConfigCreator ¶ added in v0.2.4
func DefaultEnvConfigCreator(prefix string) EnvConfigCreator
type GorillaHubCreator ¶
type HttpServerCreator ¶
type InjectorCreator ¶ added in v0.2.1
type ManagerCreator ¶
type RouterCreator ¶
type SSEServerCreator ¶
type Station ¶
type Station struct { Id string // Register will indicate if handler for websocket and sse server if // created will be automatically added into the /streams/sse and /streams/ws // endpoints. If set to false, then user is giving freedom to set their own paths // on the Router. RegisterHandlers bool Addr string Logger sabuhp.Logger Ctx context.Context WorkerRegistry *actions.WorkerTemplateRegistry // creator functions CreateEnvConfig EnvConfigCreator CreateCodec CodecCreator CreateInjector InjectorCreator CreateTransposer TransposerCreator CreateTransport TransportCreator CreateManager ManagerCreator CreateWorkerHub WorkerHubCreator CreateRouter RouterCreator CreateServer HttpServerCreator CreateTranslator TranslatorCreator CreateSSEServer SSEServerCreator CreateWebsocket GorillaHubCreator // contains filtered or unexported fields }
func DefaultLocalTransportStation ¶
func DefaultLocalTransportStation( ctx context.Context, id string, addr string, logger sabuhp.Logger, registry *actions.WorkerTemplateRegistry, ) *Station
DefaultStation returns a station using a LocalMailer backed transport layer and MessagePack codec.
func DefaultStation ¶
func DefaultStation( ctx context.Context, id string, addr string, logger sabuhp.Logger, registry *actions.WorkerTemplateRegistry, ) *Station
DefaultStation returns a station using a redis backed transport layer and MessagePack codec.
func NewStation ¶
func NewStation( ctx context.Context, id string, addr string, logger sabuhp.Logger, registry *actions.WorkerTemplateRegistry, ) *Station
NewStation returns a new instance of a station.
func (*Station) HttpHealth ¶
func (s *Station) HttpHealth() serverpub.HealthPinger
func (*Station) HttpServer ¶
func (*Station) Translator ¶ added in v0.1.4
func (s *Station) Translator() sabuhp.Translator
func (*Station) Transposer ¶
func (s *Station) Transposer() sabuhp.Transposer
func (*Station) WebsocketHandler ¶
func (*Station) WebsocketHub ¶
func (s *Station) WebsocketHub() *gorillapub.GorillaHub
type TranslatorCreator ¶ added in v0.1.4
type TransportCreator ¶
type TransportCreator func( ctx context.Context, logger sabuhp.Logger, codec sabuhp.Codec, ) (sabuhp.Transport, error)
func RedisTransportWithOptions ¶ added in v0.1.4
func RedisTransportWithOptions(config redis.Options) TransportCreator
type TransposerCreator ¶
Click to show internal directories.
Click to hide internal directories.