package str
import "github.com/purpleidea/mgmt/etcd/client/str"
Index ¶
- func GetStr(ctx context.Context, client interfaces.Client, key string) (string, error)
- func SetStr(ctx context.Context, client interfaces.Client, key string, data *string) error
- func WatchStr(ctx context.Context, client interfaces.Client, key string) (chan error, error)
Functions ¶
func GetStr ¶
GetStr collects the string which matches a global namespace in etcd.
func SetStr ¶
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 ¶
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?
Source Files ¶
- Version
- v0.0.0-20250322185616-c50a578426f1 (latest)
- Published
- Mar 22, 2025
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- 4 days ago –
Tools for package owners.