workers

package
v0.0.35 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: MIT Imports: 19 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Leadership

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

Modify Leadership struct

func NewLeadership

func NewLeadership(store data.Store) *Leadership

Update initialization

func (*Leadership) AddAvailabilityCriteria

func (w *Leadership) AddAvailabilityCriteria(criteria leadership.AvailabilityCriteria)

func (*Leadership) BecameFollower

func (w *Leadership) BecameFollower() signalslots.Signal

func (*Leadership) BecameLeader

func (w *Leadership) BecameLeader() signalslots.Signal

func (*Leadership) BecameUnavailable

func (w *Leadership) BecameUnavailable() signalslots.Signal

func (*Leadership) Deinit

func (w *Leadership) Deinit(ctx context.Context)

func (*Leadership) DoWork

func (w *Leadership) DoWork(ctx context.Context)

func (*Leadership) GetEntityFieldValidator added in v0.0.10

func (w *Leadership) GetEntityFieldValidator() data.EntityFieldValidator

func (*Leadership) Init

func (w *Leadership) Init(ctx context.Context, h app.Handle)

func (*Leadership) LosingLeadership

func (w *Leadership) LosingLeadership() signalslots.Signal

func (*Leadership) OnSchemaUpdated

func (w *Leadership) OnSchemaUpdated(ctx context.Context, n data.Notification)

func (*Leadership) OnStoreConnected

func (w *Leadership) OnStoreConnected(ctx context.Context)

func (*Leadership) OnStoreDisconnected

func (w *Leadership) OnStoreDisconnected()

type Store

type Store struct {
	Connected    signalslots.Signal
	Disconnected signalslots.Signal
	// contains filtered or unexported fields
}

func NewStore

func NewStore(store data.Store) *Store

func (*Store) Deinit

func (w *Store) Deinit(context.Context)

func (*Store) DoWork

func (w *Store) DoWork(ctx context.Context)

func (*Store) Init

func (w *Store) Init(context.Context, app.Handle)

func (*Store) IsConnected

func (w *Store) IsConnected() bool

type Web

type Web struct {
	ClientConnected    signalslots.Signal
	ClientDisconnected signalslots.Signal
	Received           signalslots.Signal
	// contains filtered or unexported fields
}

func NewWeb

func NewWeb(addr string) *Web

func (*Web) Broadcast

func (w *Web) Broadcast(p *anypb.Any)

func (*Web) Deinit

func (w *Web) Deinit(context.Context)

func (*Web) DoWork

func (w *Web) DoWork(context.Context)

func (*Web) Init

func (w *Web) Init(ctx context.Context, h app.Handle)

func (*Web) Send

func (w *Web) Send(clientId string, p *anypb.Any)

func (*Web) ServeHTTP

func (w *Web) ServeHTTP(wr http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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