host

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigResponse

type ConfigResponse struct {
	Defer          bool                 `json:"defer"`
	Shutdown       bool                 `json:"shutdown"`
	Msg            string               `json:"msg"`
	Key            string               `json:"key"`
	Certificate    string               `json:"certificate"`
	CA             string               `json:"ca"`
	SSLDir         string               `json:"ssldir"`
	ServerClaims   *tokens.ServerClaims `json:"server_claims"`
	Configuration  map[string]string    `json:"configuration"`
	ActionPolicies map[string]string    `json:"action_policies"`
	OPAPolicies    map[string]string    `json:"opa_policies"`
	UpgradeVersion string               `json:"upgrade"`
}

type Host

type Host struct {
	Identity      string                     `json:"identity"`
	CSR           *provision.CSRReply        `json:"csr"`
	ED25519PubKey *provision.ED25519Reply    `json:"ed25519_pubkey"`
	Metadata      string                     `json:"inventory"`
	JWT           *tokens.ProvisioningClaims `json:"jwt"`
	// contains filtered or unexported fields
}

func NewHost

func NewHost(identity string, conf *config.Config) *Host

func (*Host) DiscoveredTime

func (h *Host) DiscoveredTime() time.Time

func (*Host) Provision

func (h *Host) Provision(ctx context.Context, fw *choria.Framework) (bool, error)

func (*Host) String

func (h *Host) String() string

type Version

type Version struct {
	// contains filtered or unexported fields
}

Version represents a package version.

func NewVersion

func NewVersion(ver string) (version Version)

NewVersion returns a parsed version

func (Version) Compare

func (v1 Version) Compare(v2 Version) int

Compare returns an integer comparing two version. The result will be 0 if v1==v2, -1 if v1 < v2, and +1 if v1 > v2.

func (*Version) Epoch

func (v *Version) Epoch() int

Epoch is a getter method that returns the epoch.

func (*Version) Equal

func (v1 *Version) Equal(v2 Version) bool

Equal returns whether this version is equal with another version.

func (*Version) GreaterThan

func (v1 *Version) GreaterThan(v2 Version) bool

GreaterThan returns whether this version is greater than another version.

func (Version) LessThan

func (v1 Version) LessThan(v2 Version) bool

LessThan returns whether this version is less than another version.

func (*Version) Release

func (v *Version) Release() string

Release is a getter method that returns the release.

func (Version) String

func (v1 Version) String() string

String returns the full version string

func (*Version) Version

func (v *Version) Version() string

Version is a getter method that returns the version.

Jump to

Keyboard shortcuts

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