clusters

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: Apache-2.0 Imports: 14 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(options ...configs.Option)

Types

type BarrierConfig

type BarrierConfig struct {
	TTL time.Duration `json:"ttl"`
}

type Cluster

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

func (*Cluster) AddService

func (cluster *Cluster) AddService(service clusters.Service)

func (*Cluster) Barrier

func (cluster *Cluster) Barrier() (barrier barriers.Barrier)

func (*Cluster) Construct

func (cluster *Cluster) Construct(options clusters.ClusterOptions) (err error)

func (*Cluster) Join

func (cluster *Cluster) Join(ctx context.Context) (err error)

func (*Cluster) Leave

func (cluster *Cluster) Leave(ctx context.Context) (err error)

func (*Cluster) NodeEvents

func (cluster *Cluster) NodeEvents() (events <-chan clusters.NodeEvent)

func (*Cluster) Shared

func (cluster *Cluster) Shared() (shared shareds.Shared)

type Config

type Config struct {
	configs.Config
	KeepAlive KeepAliveConfig `json:"keepAlive" yaml:"keepAlive"`
	Barrier   BarrierConfig   `json:"barrier" yaml:"barrier"`
}

type KeepAliveConfig

type KeepAliveConfig struct {
	TTL      time.Duration `json:"ttl"`
	Interval time.Duration `json:"interval"`
}

func (*KeepAliveConfig) GetInterval

func (config *KeepAliveConfig) GetInterval() time.Duration

func (*KeepAliveConfig) GetTTL

func (config *KeepAliveConfig) GetTTL() time.Duration

Jump to

Keyboard shortcuts

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