package strmap

import "github.com/purpleidea/mgmt/etcd/client/strmap"

Index

Functions

func GetStrMap

func GetStrMap(ctx context.Context, client interfaces.Client, hostnameFilter []string, key string) (map[string]string, error)

GetStrMap collects all of the strings which match a namespace in etcd.

func SetStrMap

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

SetStrMap 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 WatchStrMap

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

WatchStrMap 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.

Source Files

strmap.go

Version
v0.0.0-20250322185616-c50a578426f1 (latest)
Published
Mar 22, 2025
Platform
linux/amd64
Imports
8 packages
Last checked
4 days ago

Tools for package owners.