encapapi

package
v3.0.0-rc69 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: Apache-2.0 Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("object not found")

ErrNotFound says the guest has no such object.

Functions

This section is empty.

Types

type ActionOptions

type ActionOptions struct {
	RID             string
	Leader          bool
	DisableRollback bool
	Force           bool
}

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 New

func New(c *client.T, node string, path naming.Path) *T

New returns the driver of the instance of path on node, through c.

func (*T) Action

func (t *T) Action(ctx context.Context, action string, o ActionOptions, w io.Writer) error

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) HasConfig

func (t *T) HasConfig(ctx context.Context) (bool, error)

HasConfig says whether the guest has the object.

func (*T) InstallConfig

func (t *T) InstallConfig(ctx context.Context, b []byte) error

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

func (t *T) Ping(ctx context.Context) error

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.

func (*T) Status

func (t *T) Status(ctx context.Context) (*instance.States, error)

Status refreshes the status of the instance, and returns its states. It returns ErrNotFound when the guest has no such object.

func (*T) Supports

func (t *T) Supports(action string) bool

Supports says whether action can be asked through the api. The other ones are for the caller to ask the guest another way.

Jump to

Keyboard shortcuts

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