Documentation
¶
Index ¶
- func GetMachineID() (string, error)
- func GetZincateAppID() (string, error)
- func TrimTrailingSlash(url string) string
- type FleetlockClient
- func (c *FleetlockClient) GetGroup() string
- func (c *FleetlockClient) GetID() string
- func (c *FleetlockClient) GetURL() string
- func (c *FleetlockClient) Lock() error
- func (c *FleetlockClient) Release() error
- func (c *FleetlockClient) SetGroup(group string) error
- func (c *FleetlockClient) SetID(id string) error
- func (c *FleetlockClient) SetURL(url string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetZincateAppID ¶
Find the machine-id of the current node and generate a zincati appID from it.
func TrimTrailingSlash ¶
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 ¶
func NewEmptyClient() (*FleetlockClient, error)
Create a new fleetlock client without url or group set
func (*FleetlockClient) GetGroup ¶
func (c *FleetlockClient) GetGroup() string
Get the fleetlock group
func (*FleetlockClient) GetURL ¶
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) SetGroup ¶
func (c *FleetlockClient) SetGroup(group string) error
Change the fleetlock group
func (*FleetlockClient) SetID ¶
func (c *FleetlockClient) SetID(id string) error
Change the fleetlock id
func (*FleetlockClient) SetURL ¶
func (c *FleetlockClient) SetURL(url string) error
Change the fleetlock server url
Click to show internal directories.
Click to hide internal directories.