Documentation ¶
Overview ¶
Package client contains a client wrapper for Tinkerbell.
Index ¶
- Variables
- func HardwareToJSON(h *hardware.Hardware) (string, error)
- type Hardware
- func (t *Hardware) Create(ctx context.Context, h *hardware.Hardware) error
- func (t *Hardware) Delete(ctx context.Context, id string) error
- func (t *Hardware) Get(ctx context.Context, id, ip, mac string) (*hardware.Hardware, error)
- func (t *Hardware) Update(ctx context.Context, h *hardware.Hardware) error
- type HardwareClient
- type Template
- func (t *Template) Create(ctx context.Context, template *template.WorkflowTemplate) error
- func (t *Template) Delete(ctx context.Context, id string) error
- func (t *Template) Get(ctx context.Context, id, name string) (*template.WorkflowTemplate, error)
- func (t *Template) Update(ctx context.Context, template *template.WorkflowTemplate) error
- type TemplateClient
- type Workflow
- func (t *Workflow) Create(ctx context.Context, templateID, hardwareID string) (string, error)
- func (t *Workflow) Delete(ctx context.Context, id string) error
- func (t *Workflow) Get(ctx context.Context, id string) (*workflow.Workflow, error)
- func (t *Workflow) GetActions(ctx context.Context, id string) ([]*workflow.WorkflowAction, error)
- func (t *Workflow) GetEvents(ctx context.Context, id string) ([]*workflow.WorkflowActionStatus, error)
- func (t *Workflow) GetMetadata(ctx context.Context, id string) ([]byte, error)
- func (t *Workflow) GetState(ctx context.Context, id string) (workflow.State, error)
- type WorkflowClient
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("resource not found")
ErrNotFound is returned if a requested resource is not found.
Functions ¶
Types ¶
type Hardware ¶
type Hardware struct {
// contains filtered or unexported fields
}
Hardware client for Tinkerbell.
func NewHardwareClient ¶
func NewHardwareClient(client hardware.HardwareServiceClient) *Hardware
NewHardwareClient returns a Hardware client.
type HardwareClient ¶
type Template ¶
type Template struct {
// contains filtered or unexported fields
}
Template client for Tinkerbell.
func NewTemplateClient ¶
func NewTemplateClient(client template.TemplateServiceClient) *Template
NewTemplateClient returns a Template client.
type TemplateClient ¶
type Workflow ¶
type Workflow struct {
// contains filtered or unexported fields
}
Workflow client for Tinkerbell.
func NewWorkflowClient ¶
func NewWorkflowClient(client workflow.WorkflowServiceClient, hClient *Hardware) *Workflow
NewWorkflowClient returns a Workflow client.
func (*Workflow) GetActions ¶
GetActions returns the actions for a given Tinkerbell Workflow.
func (*Workflow) GetEvents ¶
func (t *Workflow) GetEvents(ctx context.Context, id string) ([]*workflow.WorkflowActionStatus, error)
GetEvents returns the events for a given Tinkerbell Workflow.
func (*Workflow) GetMetadata ¶
GetMetadata returns the metadata for a given Tinkerbell Workflow.
Click to show internal directories.
Click to hide internal directories.