spec

package
v0.81.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 20 Imported by: 30

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CloudGeneratorSuggester *cloudGeneratorSuggester

CloudGeneratorSuggester suggests suitable CloudGenerator

Functions

func Collect added in v0.6.1

func Collect(specGenerators []Generator) mackerel.HostMeta

Collect spec values

func IsLoopback added in v0.59.3

func IsLoopback(iface mkr.Interface) bool

IsLoopback returns true if iface contains only loopback addresses. Is it possible that a interface contains mixed IPs both loopback address and else?

Types

type AzureVMGenerator added in v0.44.0

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

AzureVMGenerator meta generator for Azure VM

func (*AzureVMGenerator) Generate added in v0.44.0

func (g *AzureVMGenerator) Generate() (*mackerel.Cloud, error)

Generate collects metadata from cloud platform.

func (*AzureVMGenerator) IsAzureVM added in v0.65.0

func (g *AzureVMGenerator) IsAzureVM(ctx context.Context) bool

IsAzureVM checks current environment is AzureVM or not

func (*AzureVMGenerator) SuggestCustomIdentifier added in v0.44.0

func (g *AzureVMGenerator) SuggestCustomIdentifier() (string, error)

SuggestCustomIdentifier suggests the identifier of the Azure VM instance

type CloudGenerator added in v0.18.1

type CloudGenerator struct {
	CloudMetaGenerator
}

CloudGenerator definition

func (*CloudGenerator) Generate added in v0.65.0

func (c *CloudGenerator) Generate() (any, error)

Generate generates metadata

type CloudMetaGenerator added in v0.18.1

type CloudMetaGenerator interface {
	Generate() (*mackerel.Cloud, error)
	SuggestCustomIdentifier() (string, error)
}

CloudMetaGenerator interface of metadata generator for each cloud platform

type EC2Generator added in v0.18.1

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

EC2Generator meta generator for EC2

func (*EC2Generator) Generate added in v0.18.1

func (g *EC2Generator) Generate() (*mackerel.Cloud, error)

Generate collects metadata from cloud platform.

func (*EC2Generator) IsEC2 added in v0.65.0

func (g *EC2Generator) IsEC2(ctx context.Context) bool

IsEC2 checks current environment is EC2 or not

func (*EC2Generator) SuggestCustomIdentifier added in v0.33.0

func (g *EC2Generator) SuggestCustomIdentifier() (string, error)

SuggestCustomIdentifier suggests the identifier of the EC2 instance

type FilesystemGenerator

type FilesystemGenerator struct {
}

FilesystemGenerator generates filesystem spec.

func (*FilesystemGenerator) Generate

func (g *FilesystemGenerator) Generate() (any, error)

Generate specs of filesystems.

type GCEGenerator added in v0.19.0

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

GCEGenerator generate for GCE

func (*GCEGenerator) Generate added in v0.19.0

func (g *GCEGenerator) Generate() (*mackerel.Cloud, error)

Generate collects metadata from cloud platform.

func (*GCEGenerator) IsGCE added in v0.65.0

func (g *GCEGenerator) IsGCE(ctx context.Context) bool

IsGCE checks current environment is GCE or not

func (*GCEGenerator) SuggestCustomIdentifier added in v0.33.0

func (g *GCEGenerator) SuggestCustomIdentifier() (string, error)

SuggestCustomIdentifier the identifier of the GCE VM instance

type Generator

type Generator interface {
	Generate() (any, error)
}

Generator interface for generating spec values

type InterfaceGenerator

type InterfaceGenerator interface {
	Generate() ([]mkr.Interface, error)
}

InterfaceGenerator retrieve network information

type Interfaces added in v0.59.3

type Interfaces map[string]mkr.Interface

Interfaces are map of network interfaces per name

func (Interfaces) AppendIPv4Address added in v0.59.3

func (ifs Interfaces) AppendIPv4Address(name, addr string)

AppendIPv4Address appends ipv4address

func (Interfaces) AppendIPv6Address added in v0.59.3

func (ifs Interfaces) AppendIPv6Address(name, addr string)

AppendIPv6Address appends ipv6address

func (Interfaces) SetMacAddress added in v0.59.3

func (ifs Interfaces) SetMacAddress(name, addr string)

SetMacAddress sets the macaddress

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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