Documentation ¶
Index ¶
- func AssembleIgnitionTemplate(fname string, w io.Writer) error
- func Is4xx(err error) bool
- func Is5xx(err error) bool
- func IsConflict(err error) bool
- func IsNotFound(err error) bool
- type Client
- func (c *Client) AssetsDelete(ctx context.Context, name string) error
- func (c *Client) AssetsIndex(ctx context.Context) ([]string, error)
- func (c *Client) AssetsInfo(ctx context.Context, name string) (*sabakan.Asset, error)
- func (c *Client) AssetsUpload(ctx context.Context, name, filename string, meta map[string]string) (*sabakan.AssetStatus, error)
- func (c *Client) CryptsDelete(ctx context.Context, serial string) error
- func (c *Client) CryptsGet(ctx context.Context, serial, device string) ([]byte, error)
- func (c *Client) CryptsPut(ctx context.Context, serial, device string, key []byte) error
- func (c *Client) DHCPConfigGet(ctx context.Context) (*sabakan.DHCPConfig, error)
- func (c *Client) DHCPConfigSet(ctx context.Context, conf *sabakan.DHCPConfig) error
- func (c *Client) IPAMConfigGet(ctx context.Context) (*sabakan.IPAMConfig, error)
- func (c *Client) IPAMConfigSet(ctx context.Context, conf *sabakan.IPAMConfig) error
- func (c *Client) IgnitionsCat(ctx context.Context, role, id string, w io.Writer) error
- func (c *Client) IgnitionsDelete(ctx context.Context, role, id string) error
- func (c *Client) IgnitionsGet(ctx context.Context, role string) ([]*sabakan.IgnitionInfo, error)
- func (c *Client) IgnitionsSet(ctx context.Context, role, id string, r io.Reader, meta map[string]string) error
- func (c *Client) ImagesDelete(ctx context.Context, os, id string) error
- func (c *Client) ImagesIndex(ctx context.Context, os string) (sabakan.ImageIndex, error)
- func (c *Client) ImagesUpload(ctx context.Context, os, id string, kernel io.Reader, kernelSize int64, ...) error
- func (c *Client) KernelParamsGet(ctx context.Context, os string) (sabakan.KernelParams, error)
- func (c *Client) KernelParamsSet(ctx context.Context, os string, params sabakan.KernelParams) error
- func (c *Client) LogsGet(ctx context.Context, since, until time.Time, w io.Writer) error
- func (c *Client) MachinesCreate(ctx context.Context, specs []*sabakan.MachineSpec) error
- func (c *Client) MachinesGet(ctx context.Context, params map[string]string) ([]sabakan.Machine, error)
- func (c *Client) MachinesGetState(ctx context.Context, serial string) (sabakan.MachineState, error)
- func (c *Client) MachinesRemove(ctx context.Context, serial string) error
- func (c *Client) MachinesSetRetireDate(ctx context.Context, serial string, date time.Time) error
- func (c *Client) MachinesSetState(ctx context.Context, serial string, state string) error
- type IgnitionInfo
- type ImageIndex
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssembleIgnitionTemplate ¶
AssembleIgnitionTemplate assemble ignition template from fname to w
func IsConflict ¶
IsConflict returns true if err contains 409 status code
func IsNotFound ¶
IsNotFound returns true if err contains 404 status code
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a sabakan client
func (*Client) AssetsDelete ¶
AssetsDelete deletes an asset
func (*Client) AssetsIndex ¶
AssetsIndex retrieves index of assets
func (*Client) AssetsInfo ¶
AssetsInfo retrieves meta data of an asset
func (*Client) AssetsUpload ¶
func (c *Client) AssetsUpload(ctx context.Context, name, filename string, meta map[string]string) (*sabakan.AssetStatus, error)
AssetsUpload stores a file as an asset
func (*Client) CryptsDelete ¶
CryptsDelete removes all encryption keys of the machine specified by serial.
func (*Client) DHCPConfigGet ¶
DHCPConfigGet retrieves DHCP configurations
func (*Client) DHCPConfigSet ¶
DHCPConfigSet sets DHCP configurations
func (*Client) IPAMConfigGet ¶
IPAMConfigGet retrieves IPAM configurations
func (*Client) IPAMConfigSet ¶
IPAMConfigSet sets IPAM configurations
func (*Client) IgnitionsCat ¶
IgnitionsCat gets an ignition template for the role an id
func (*Client) IgnitionsDelete ¶
IgnitionsDelete deletes an ignition template specified by role and id
func (*Client) IgnitionsGet ¶
IgnitionsGet gets list of ignition template info of the specified role
func (*Client) IgnitionsSet ¶
func (c *Client) IgnitionsSet(ctx context.Context, role, id string, r io.Reader, meta map[string]string) error
IgnitionsSet puts an ignition template file
func (*Client) ImagesDelete ¶
ImagesDelete deletes image file.
func (*Client) ImagesIndex ¶
ImagesIndex get index of images.
func (*Client) ImagesUpload ¶
func (c *Client) ImagesUpload(ctx context.Context, os, id string, kernel io.Reader, kernelSize int64, initrd io.Reader, initrdSize int64) error
ImagesUpload upload image file.
func (*Client) KernelParamsGet ¶
KernelParamsGet retrieves kernel parameters
func (*Client) KernelParamsSet ¶
KernelParamsSet sets kernel parameters
func (*Client) MachinesCreate ¶
MachinesCreate create machines information to sabakan server
func (*Client) MachinesGet ¶
func (c *Client) MachinesGet(ctx context.Context, params map[string]string) ([]sabakan.Machine, error)
MachinesGet get machine information from sabakan server
func (*Client) MachinesGetState ¶
MachinesGetState get the state of the machine from sabakan server
func (*Client) MachinesRemove ¶
MachinesRemove removes machine information from sabakan server
func (*Client) MachinesSetRetireDate ¶
MachinesSetRetireDate set the retire date of the machine.
type IgnitionInfo ¶
type IgnitionInfo = sabakan.IgnitionInfo
IgnitionInfo represents information of an ignition template