distributed

package
v0.0.114 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EtcDelete

func EtcDelete(key string) error

func EtcdPut

func EtcdPut(key string, value string) error

Types

type KV

type KV struct {
	Key      string
	Val      []byte
	Category int
	Agent    string
	Local    bool
}

func NewDecode

func NewDecode(decoder *gob.Decoder, agent string) KV

func NewEncode

func NewEncode(key string, value []byte, agent string, category int) KV

func (KV) IsLocal

func (kv KV) IsLocal() bool

type Replication

type Replication struct {
	Client  *client.Client
	User    *authentication.User
	DataC   chan KV
	EventsC chan KV
}

func New

func New(client *client.Client, user *authentication.User) *Replication

func (*Replication) HandleEtcd

func (replication *Replication) HandleEtcd(data KV)

func (*Replication) HandleInvalid

func (replication *Replication) HandleInvalid(data KV)

func (*Replication) HandleObject

func (replication *Replication) HandleObject(data KV)

func (*Replication) HandleObjectDelete

func (replication *Replication) HandleObjectDelete(data KV)

func (*Replication) HandlePlain

func (replication *Replication) HandlePlain(data KV)

func (*Replication) HandleSecret

func (replication *Replication) HandleSecret(data KV)

func (*Replication) ListenData

func (replication *Replication) ListenData(agent string)

func (*Replication) ListenEtcd

func (replication *Replication) ListenEtcd(agent string) error

Jump to

Keyboard shortcuts

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