internal

package
v0.0.0-...-de4d3f4 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicStore

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

func NewBasicStore

func NewBasicStore() (BasicStore, error)

func (*BasicStore) Get

func (c *BasicStore) Get() (string, time.Time)

func (*BasicStore) Set

func (c *BasicStore) Set(value string, updatedAt time.Time)

func (*BasicStore) Update

func (c *BasicStore) Update(value string)

type Observer

type Observer interface {
	GetChan() <-chan string
}

type PollingObserver

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

func NewPollingObserver

func NewPollingObserver() PollingObserver

func (*PollingObserver) GetChan

func (c *PollingObserver) GetChan() <-chan string

func (*PollingObserver) Run

func (c *PollingObserver) Run(ctx context.Context) error

type ServiceDiscovery

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

func NewServiceDiscovery

func NewServiceDiscovery(port int, onPeersUpdate func([]string)) (ServiceDiscovery, error)

func (*ServiceDiscovery) Run

func (sd *ServiceDiscovery) Run(ctx context.Context) error

type Store

type Store interface {
	Get() (string, time.Time)
	Update(value string)
	Set(value string, updatedAt time.Time)
}

Jump to

Keyboard shortcuts

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