fingerprint

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2015 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BuiltinFingerprints = []string{
	"arch",
	"cpu",
	"host",
	"memory",
	"storage",
	"network",
	"env_aws",
}

BuiltinFingerprints is a slice containing the key names of all regestered fingerprints available, to provided an ordered iteration

Functions

This section is empty.

Types

type ArchFingerprint

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

ArchFingerprint is used to fingerprint the architecture

func (*ArchFingerprint) Fingerprint

func (f *ArchFingerprint) Fingerprint(config *client.Config, node *structs.Node) (bool, error)

type CPUFingerprint

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

CPUFingerprint is used to fingerprint the CPU

func (*CPUFingerprint) Fingerprint

func (f *CPUFingerprint) Fingerprint(cfg *config.Config, node *structs.Node) (bool, error)

type ConsulFingerprint

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

ConsulFingerprint is used to fingerprint the architecture

func (*ConsulFingerprint) Fingerprint

func (f *ConsulFingerprint) Fingerprint(config *client.Config, node *structs.Node) (bool, error)

type EnvAWSFingerprint

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

EnvAWSFingerprint is used to fingerprint the CPU

func (*EnvAWSFingerprint) Fingerprint

func (f *EnvAWSFingerprint) Fingerprint(cfg *config.Config, node *structs.Node) (bool, error)

type Factory

type Factory func(*log.Logger) Fingerprint

Factory is used to instantiate a new Fingerprint

type Fingerprint

type Fingerprint interface {
	// Fingerprint is used to update properties of the Node,
	// and returns if the fingerprint was applicable and a potential error.
	Fingerprint(*config.Config, *structs.Node) (bool, error)
}

Fingerprint is used for doing "fingerprinting" of the host to automatically determine attributes, resources, and metadata about it. Each of these is a heuristic, and many of them can be applied on a particular host.

func NewArchFingerprint

func NewArchFingerprint(logger *log.Logger) Fingerprint

NewArchFingerprint is used to create an OS fingerprint

func NewCPUFingerprint

func NewCPUFingerprint(logger *log.Logger) Fingerprint

NewCPUFingerprint is used to create a CPU fingerprint

func NewConsulFingerprint

func NewConsulFingerprint(logger *log.Logger) Fingerprint

NewConsulFingerprint is used to create an OS fingerprint

func NewEnvAWSFingerprint

func NewEnvAWSFingerprint(logger *log.Logger) Fingerprint

NewEnvAWSFingerprint is used to create a CPU fingerprint

func NewFingerprint

func NewFingerprint(name string, logger *log.Logger) (Fingerprint, error)

NewFingerprint is used to instantiate and return a new fingerprint given the name and a logger

func NewHostFingerprint

func NewHostFingerprint(logger *log.Logger) Fingerprint

NewHostFingerprint is used to create a Host fingerprint

func NewMemoryFingerprint

func NewMemoryFingerprint(logger *log.Logger) Fingerprint

NewMemoryFingerprint is used to create a Memory fingerprint

func NewNetworkFingerprinter

func NewNetworkFingerprinter(logger *log.Logger) Fingerprint

NewNetworkFingerprinter returns a new NetworkFingerprinter with the given logger

func NewStorageFingerprint

func NewStorageFingerprint(logger *log.Logger) Fingerprint

type HostFingerprint

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

HostFingerprint is used to fingerprint the host

func (*HostFingerprint) Fingerprint

func (f *HostFingerprint) Fingerprint(cfg *config.Config, node *structs.Node) (bool, error)

type MemoryFingerprint

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

MemoryFingerprint is used to fingerprint the available memory on the node

func (*MemoryFingerprint) Fingerprint

func (f *MemoryFingerprint) Fingerprint(cfg *config.Config, node *structs.Node) (bool, error)

type NetworkFingerprint

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

NetworkFingerprint is used to fingerprint the Network capabilities of a node

func (*NetworkFingerprint) Fingerprint

func (f *NetworkFingerprint) Fingerprint(cfg *config.Config, node *structs.Node) (bool, error)

type StorageFingerprint

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

StorageFingerprint is used to measure the amount of storage free for applications that the Nomad agent will run on this machine.

func (*StorageFingerprint) Fingerprint

func (f *StorageFingerprint) Fingerprint(cfg *config.Config, node *structs.Node) (bool, error)

Jump to

Keyboard shortcuts

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