Documentation ¶
Index ¶
- func InsertPermalinkData(ctx context.Context, etcdClient *etcd.Client, id string, data []byte) (bool, error)
- func RetrievePermalinkData(ctx context.Context, etcdClient *etcd.Client, id string) ([]byte, error)
- func SetEtcdKeyPrefix(prefix string)
- func UpsertPermalinkData(ctx context.Context, etcdClient *etcd.Client, id string, data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InsertPermalinkData ¶
func InsertPermalinkData(ctx context.Context, etcdClient *etcd.Client, id string, data []byte) (bool, error)
Same as UpdatePermalinkData, but fails if the permalink already exists in the database. Returns true on success and false on failure.
func RetrievePermalinkData ¶
Retrieves the data for a permalink, given its ID.
func SetEtcdKeyPrefix ¶
func SetEtcdKeyPrefix(prefix string)
Sets the prefix added to keys in the etcd database. The keys used are of the form <prefix>mrplotter/permalinks/<id>. The prefix allows separate deployments of Mr. Plotter to coexist in a single etcd database system.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.