Documentation
¶
Overview ¶
Package encapapi drives the instance of an object on a guest through the api of the guest daemon, for the master of the object.
Index ¶
- Variables
- type ActionOptions
- type T
- func (t *T) Action(ctx context.Context, action string, o ActionOptions, w io.Writer) error
- func (t *T) HasConfig(ctx context.Context) (bool, error)
- func (t *T) InstallConfig(ctx context.Context, b []byte) error
- func (t *T) Ping(ctx context.Context) error
- func (t *T) Status(ctx context.Context) (*instance.States, error)
- func (t *T) Supports(action string) bool
Constants ¶
This section is empty.
Variables ¶
var ErrNotFound = errors.New("object not found")
ErrNotFound says the guest has no such object.
Functions ¶
This section is empty.
Types ¶
type ActionOptions ¶
ActionOptions are the options of an action, the ones the master gives its encap instances.
type T ¶
type T struct {
// contains filtered or unexported fields
}
T drives the instance of the object path on the node of a guest.
func (*T) Action ¶
Action runs action on the instance and returns when it ended, with the error of the exec when it failed. Its logs are written to w as they come.
func (*T) InstallConfig ¶
InstallConfig writes the configuration b on the guest, creating the object or replacing the configuration it has, with its own id kept. It returns once the guest daemon knows of it.
func (*T) Ping ¶
Ping says whether the guest daemon answers as a root peer. Nothing has been asked of the guest when it fails, so the caller can reach it another way.