redis_signaling

package
v0.0.0-...-27c307a Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NotAvailableRedisClientError = fmt.Errorf("Not available redis client")
	SessionChannelClosedError    = fmt.Errorf("Session channel closed")
	SessionChannelNotExistError  = fmt.Errorf("Session channel not exist")
	SessionChannelExistError     = fmt.Errorf("Session channel exist")
)

Functions

func DefaultEngineOption

func DefaultEngineOption() ofn.Option

func NewRedisEngine

func NewRedisEngine(opts ...signaling.NewEngineOption) (signaling.Engine, error)

func WithHealthCheckPeriod

func WithHealthCheckPeriod(d time.Duration) signaling.NewEngineOption

func WithResolvePeriod

func WithResolvePeriod(d time.Duration) signaling.NewEngineOption

func WithURL

func WithURL(url string) signaling.NewEngineOption

func WithWaitWiredEventTimeout

func WithWaitWiredEventTimeout(d time.Duration) signaling.NewEngineOption

Types

type Event

type Event struct {
	Name       string                `json:"name"`
	Session    int32                 `json:"session"`
	Descriptor *signaling.Descriptor `json:"descriptor,omitempty"`
	Error      string                `json:"error,omitempty"`
}

func NewErrorEventWithSession

func NewErrorEventWithSession(session int32, err error) *Event

func NewEvent

func NewEvent(name string, session int32, descriptor *signaling.Descriptor, err error) *Event

func NewWireEvent

func NewWireEvent(descriptor *signaling.Descriptor) *Event

func NewWireEventWithSession

func NewWireEventWithSession(session int32, descriptor *signaling.Descriptor) *Event

func NewWiredEventWithSession

func NewWiredEventWithSession(session int32, descriptor *signaling.Descriptor) *Event

type RedisEngine

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

func (*RedisEngine) Close

func (e *RedisEngine) Close() error

func (*RedisEngine) ID

func (e *RedisEngine) ID() string

func (*RedisEngine) OnWire

func (e *RedisEngine) OnWire(h signaling.WireHandler)

func (*RedisEngine) Wire

func (e *RedisEngine) Wire(dst, src *signaling.Descriptor) (*signaling.Descriptor, error)

Jump to

Keyboard shortcuts

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