fingerprint

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0

Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBootId

func GetBootId() string

Types

type Addresses

type Addresses map[string][]string

Addresses will store the nic addresses mapped by the nickname.

func (Addresses) Equals

func (a Addresses) Equals(b Addresses) bool

Equals check if the Address has the same values.

type Fingerprint

type Fingerprint struct {
	FullHostname    string    `json:"fullHostname"`
	Hostname        string    `json:"hostname"`
	CloudProviderId string    `json:"cloudProviderId"`
	DisplayName     string    `json:"displayName"`
	BootID          string    `json:"bootId"`
	IpAddresses     Addresses `json:"ipAddresses"`
	MacAddresses    Addresses `json:"macAddresses"`
}

Fingerprint is used in the agent connect step when communicating with the backend. Based on it the backend will uniquely identify the agent and respond with the entityKey and entityId.

func (*Fingerprint) Equals

func (f *Fingerprint) Equals(new Fingerprint) bool

Equals check to see if current fingerprint is equal to provided one.

type Harvester

type Harvester interface {
	Harvest() (fp Fingerprint, err error)
}

Harvester harvest agent's fingerprint.

func NewHarvestor

func NewHarvestor(config *config.Config, hostnameResolver hostname.Resolver, cloudHarvester cloud.Harvester) (Harvester, error)

NewHarvestor creates a new Harvester.

type MockHarvestor

type MockHarvestor struct{}

MockHarvestor Harvester mock

func (*MockHarvestor) Harvest

func (ir *MockHarvestor) Harvest() (Fingerprint, error)

Harvest retrieves agent fingerprint.

Jump to

Keyboard shortcuts

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