fleetlock

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetZincateAppID

func GetZincateAppID() (string, error)

Find the machine-id of the current node and generate a zincati appID from it.

func TrimTrailingSlash added in v0.1.1

func TrimTrailingSlash(url string) string

When having // in a URL, it somehow converts the request from POST to GET. See: https://github.com/golang/go/issues/69063 In general it could lead to unintended behaviour.

Types

type FleetlockClient

type FleetlockClient struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(url, group string) (*FleetlockClient, error)

Create a new client for fleetlock

func NewEmptyClient added in v0.2.0

func NewEmptyClient() (*FleetlockClient, error)

Create a new fleetlock client without url or group set

func (*FleetlockClient) GetGroup added in v0.2.0

func (c *FleetlockClient) GetGroup() string

Get the fleetlock group

func (*FleetlockClient) GetURL added in v0.2.0

func (c *FleetlockClient) GetURL() string

Get the fleetlock server url

func (*FleetlockClient) Lock

func (c *FleetlockClient) Lock() error

Aquire a lock for this machine

func (*FleetlockClient) Release

func (c *FleetlockClient) Release() error

Release the hold lock

func (*FleetlockClient) SetGroup added in v0.2.0

func (c *FleetlockClient) SetGroup(group string) error

Change the fleetlock group

func (*FleetlockClient) SetURL added in v0.2.0

func (c *FleetlockClient) SetURL(url string) error

Change the fleetlock server url

Jump to

Keyboard shortcuts

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