tag

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnmarshalTags

func UnmarshalTags(tags []label.KeyValue, v interface{}) error

UnmarshalTags parses labels and store the result into v.

Types

type Cloud

type Cloud struct {
	Provider string `resource:"provider"`
}

Cloud represents the standard cloud attributes.

type Host

type Host struct {
	ID   string `resource:"id"`
	Name string `resource:"name"`
}

Host represents the standard host attributes.

type Instance

type Instance struct {
	ID string `resource:"id"`
}

Instance represents the standard instance attributes.

type Resource

type Resource struct {
	Service Service `resource:"service"`
	Host    Host    `resource:"host"`
	Cloud   Cloud   `resource:"cloud"`
}

Resource represents a resource constructed with labels.

func (*Resource) CustomIdentifier

func (r *Resource) CustomIdentifier() string

CustomIdentifier returns a proper customIdentifier for the host.

func (*Resource) Hostname

func (r *Resource) Hostname() string

Hostname returns a proper hostname.

func (*Resource) RoleFullname

func (r *Resource) RoleFullname() string

RoleFullname returns a full qualified role name.

func (*Resource) RoleName

func (r *Resource) RoleName() string

RoleName returns a role name.

func (*Resource) ServiceName

func (r *Resource) ServiceName() string

ServiceName returns a service name.

type Service

type Service struct {
	Name     string   `resource:"name"`
	NS       string   `resource:"namespace"`
	Instance Instance `resource:"instance"`
	Version  string   `resource:"version"`
}

Service represents the standard service attributes.

Jump to

Keyboard shortcuts

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