str

package
v0.0.0-...-c555478 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStr

func GetStr(ctx context.Context, client interfaces.Client, key string) (string, error)

GetStr collects the string which matches a global namespace in etcd.

func SetStr

func SetStr(ctx context.Context, client interfaces.Client, key string, data *string) error

SetStr sets a key and hostname pair to a certain value. If the value is nil, then it deletes the key. Otherwise the value should point to a string. TODO: TTL or delete disconnect?

func WatchStr

func WatchStr(ctx context.Context, client interfaces.Client, key string) (chan error, error)

WatchStr returns a channel which spits out events on key activity. FIXME: It should close the channel when it's done, and spit out errors when something goes wrong. XXX: since the caller of this (via the World API) has no way to tell it it's done, does that mean we leak go-routines since it might still be running, but perhaps even blocked??? Could this cause a dead-lock? Should we instead return some sort of struct which has a close method with it to ask for a shutdown?

Types

This section is empty.

Jump to

Keyboard shortcuts

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