resiphost

package
v3.0.0-rc67 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: Apache-2.0 Imports: 29 Imported by: ? 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

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupInterface holds the interface of the node the address is
	// plumbed on, and how.
	GroupInterface = keywords.Group{
		ID:    "interface",
		Name:  "Interface",
		Text:  keywords.NewText(fs, "text/group/interface"),
		Order: 20,
	}

	// GroupRouting holds the gateway of the address, which the driver
	// reads but sets no route with.
	GroupRouting = keywords.Group{
		ID:    "routing",
		Name:  "Routing",
		Text:  keywords.NewText(fs, "text/group/routing"),
		Order: 30,
	}
)

The groups of the keywords of an ip.host resource beside the addressing and dns groups of the ip drivers. They have the ids, names and orders of the interface and routing groups of ip.netns, their texts saying the interface of the node.

Functions

func New

func New() resource.Driver

Types

type Addrs

type Addrs []net.Addr

func (Addrs) Has

func (t Addrs) Has(ip net.IP) bool

type T

type T struct {
	resource.T
	resource.Restart

	Path       naming.Path
	ObjectFQDN string
	DNS        []string

	// config
	Name         string         `json:"name"`
	Dev          string         `json:"dev"`
	Netmask      string         `json:"netmask"`
	Network      string         `json:"network"`
	Addr         string         `json:"addr"`
	Gateway      string         `json:"gateway"`
	Provisioner  string         `json:"provisioner"`
	CheckCarrier bool           `json:"check_carrier"`
	Alias        bool           `json:"alias"`
	Expose       []string       `json:"expose"`
	WaitDNS      *time.Duration `json:"wait_dns"`
	// contains filtered or unexported fields
}

func (*T) Abort

func (t *T) Abort(ctx context.Context) bool

func (*T) Configure

func (t *T) Configure() error

Configure fills from the network what the configuration did not say: the interface of this node the address is configured on, and the prefix length it is configured with. They are the network's to know, so naming the network is enough, and an explicit value always wins.

func (*T) DriverID

func (t *T) DriverID() driver.ID

func (*T) Holds

func (t *T) Holds(src resource.HoldSource) []resource.Hold

Holds says the address, as named or drawn from a network.

func (*T) Label

func (t *T) Label(_ context.Context) string

Label implements Label from resource.Driver interface, it returns a formatted short description of the Resource

func (*T) Manifest

func (t *T) Manifest() *manifest.T

Manifest exposes to the core the input expected by the driver.

func (*T) Provision

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

func (*T) ProvisionConflicts

func (t *T) ProvisionConflicts(ctx context.Context) []string

ProvisionConflicts says the address answers already, from another host or another object of this one: the provision would bring it up a second time. An address still to draw from a network is not checked: it is drawn free.

A provision that does not start the address, off the leader of the placement and not standby, brings nothing up a second time: the address answering is then the one the leader of this object started, and the start of this node checks it again. An address up on the device of the resource is its own, as the abort of a start counts it.

func (*T) ProvisionStart

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

ProvisionStart starts the address at the end of its provision on the placement leader only: see resip.ProvisionStarts.

func (*T) Provisioned

func (t *T) Provisioned(ctx context.Context) (provisioned.T, error)

func (*T) Start

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

func (*T) Status

func (t *T) Status(ctx context.Context) status.T

func (*T) StatusInfo

func (t *T) StatusInfo(_ context.Context) map[string]interface{}

StatusInfo implements resource.StatusInfoer

func (*T) Stop

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

func (*T) Unprovision

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

func (*T) UnprovisionStop

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

UnprovisionStop stops the resource, and releases the address drawn from the network, which a stop keeps: the address is the service's, which its clients know it by, until the service is unprovisioned. Every node releases its reservation, and the leader removes the address from the configuration, once for all of them.

Jump to

Keyboard shortcuts

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