broadcast

package
v0.0.0-...-4450389 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigEventAge = ConfigEventAgeDays * 24 * time.Hour
View Source
const ConfigEventAgeDays = 30

`ConfigEventAgeDays` is the minimal age of an event before it can become the new epoch.

View Source
const ConfigSinceEpochUpdate = ConfigSinceEpochUpdateDays * 24 * time.Hour
View Source
const ConfigSinceEpochUpdateDays = 30

`ConfigSinceEpochUpdate` is the time that must have passed since the epoch was updated before the epoch can become the new tail.

Variables

This section is empty.

Functions

func NewEventChain

func NewEventChain(
	parent ulid.I, pbs []*pb.BroadcastEvent,
) ([]events.Event, error)

Types

type Broadcaster

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

func New

func New(
	lg Logger, broadcastJ *events.Journal, id uuid.I, cfg WatchConfig,
) *Broadcaster

func (*Broadcaster) Process

func (b *Broadcaster) Process(ctx context.Context) error

type Event

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

func (*Event) Id

func (e *Event) Id() ulid.I

func (*Event) MarshalProto

func (e *Event) MarshalProto() ([]byte, error)

func (*Event) Parent

func (e *Event) Parent() ulid.I

func (*Event) PbBroadcastEvent

func (e *Event) PbBroadcastEvent() *pb.BroadcastEvent

func (*Event) UnmarshalProto

func (e *Event) UnmarshalProto(data []byte) error

func (Event) WithId

func (e Event) WithId(id ulid.I) events.Event

Receiver by value.

func (Event) WithParent

func (e Event) WithParent(parent ulid.I) events.Event

Receiver by value.

type Logger

type Logger interface {
	Errorw(msg string, kv ...interface{})
}

type WatchConfig

type WatchConfig struct {
	MainJ     *events.Journal
	RegistryJ *events.Journal
	ReposJ    *events.Journal
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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