core

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Zone    string `config:"zone"`
	Addr    string `config:"addr"`
	JwksURL string `config:"jwks_url"`
	Nodes   []Node `config:"nodes"`
}

func NewConfig

func NewConfig(path string) (*Config, error)

type Event added in v0.8.0

type Event struct {
	UserID   string           `json:"user_id"`
	Topic    *topic.TopicName `json:"topic"`
	Name     string           `json:"name"`
	Data     any              `json:"data"`
	Metadata any              `json:"metadata"`
}

type EventBus added in v0.8.0

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

func NewEventBus added in v0.8.0

func NewEventBus(options *EventBusOptions) *EventBus

func (*EventBus) Send added in v0.8.0

func (bus *EventBus) Send(event *Event)

func (*EventBus) Subscribe added in v0.8.0

func (bus *EventBus) Subscribe(userID string, sessionID string, filter *topic.TopicFilter)

func (*EventBus) Unsubscribe added in v0.8.0

func (bus *EventBus) Unsubscribe(userID string, sessionID string, filter *topic.TopicFilter)

type EventBusOptions added in v0.8.0

type EventBusOptions struct {
	Server *sse.Server
}

type Node added in v0.8.0

type Node struct {
	URL    string `config:"url"`
	Zone   string `config:"zone"`
	Shared bool   `config:"shared"`
}

type Subscription added in v0.8.0

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

Jump to

Keyboard shortcuts

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