hostdoc

package
v1.11.65 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

README

Host Document Format:

The Host Document is expected to contain the following JSON

{
        "provider": "value",
	"account_id": "value",
	"project_number": "value",
	"uuid": “long hex value",
	"domain": "value",
	"service": "comma separated value",
	"profile": "value”,
	"zone": "openstack cluster",
        "ip": ["value"],
        "launch_time": "RFC 3339",
}

The Json would be dropped into a file such as /var/lib/sia/host_document.

Notes:

The service entry is a comma-separated value. The first one is the primary service name that can be used by tools when the service is not provided in the context.

Stop/start an ec2 instance will update the launch_time.

Documentation

Index

Constants

View Source
const (
	DOMAIN              = "domain"
	SERVICE             = "service"
	SERVICES            = "services"
	PROFILE             = "profile"
	PROFILE_RESTRICT_TO = "profile_restrict_to"
	PROVIDER            = "provider"
	IP                  = "ip"
	UUID                = "uuid"
	ZONE                = "zone"
)

Variables

This section is empty.

Functions

func Write added in v1.10.56

func Write(doc raw.Doc, docPath string) error

Types

type Doc

type Doc struct {
	Provider          provider.Provider
	Domain            string
	Profile           string
	ProfileRestrictTo string
	Services          []string
	AccountId         string
	ProjectNumber     string
	Uuid              string
	Ip                map[string]bool
	Zone              string
	Bytes             []byte
	LaunchTime        time.Time
}

func NewPlainDoc

func NewPlainDoc(bytes []byte) (*Doc, string, error)

NewPlainDoc returns Doc, the provider string from the host_document, and an error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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