replicator

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 License: AGPL-3.0-or-later Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actor

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

Actor is responsible for managing the replicator.

func StartActor

func StartActor(ctx context.Context, params StartActorParams) *Actor

StartActor starts a new replicator actor.

The channel exposed by [C] must be consumed by the caller.

func (*Actor) C

func (a *Actor) C() <-chan State

C returns a channel that will receive the current state of the replicator. The channel is never closed.

func (*Actor) Close

func (a *Actor) Close() error

Close closes the actor.

func (*Actor) StartDestination

func (a *Actor) StartDestination(url string)

StartDestination starts a destination stream.

func (*Actor) StopDestination

func (a *Actor) StopDestination(url string)

StopDestination stops a destination stream.

type StartActorParams added in v0.0.5

type StartActorParams struct {
	SourceURL       string
	ChanSize        int
	ContainerClient *container.Client
	Logger          *slog.Logger
}

StartActorParams contains the parameters for starting a new replicator actor.

type State

type State struct {
	URL       string
	Container domain.Container
	Status    domain.DestinationStatus
}

State is the state of a single destination from the point of view of the replicator.

Jump to

Keyboard shortcuts

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