zedagent

package
v0.0.0-...-a6598b8 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: 71 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxBaseOsCount   = 2
	BaseOsImageCount = 1
)
View Source
const (
	ControllerDest destinationBitset = 1
	LPSDest                          = 2
	LOCDest                          = 4
	AllDest                          = ControllerDest | LPSDest | LOCDest
)

Destination types, where info should be sent

View Source
const (

	//EventLogPath is the TPM measurement log aka TPM event log
	EventLogPath = "/sys/kernel/security/tpm0/binary_bios_measurements"
)
View Source
const (
	//WatchdogDevicePath is the Watchdog device file path
	WatchdogDevicePath = "/dev/watchdog"
)

Variables

View Source
var Version = "No version specified"

Set from Makefile

Functions

func IsMyAddress

func IsMyAddress(clientIP net.IP) bool

IsMyAddress checks the IP address against the local IPs. Returns True if there is a match.

func PublishAppInfoToZedCloud

func PublishAppInfoToZedCloud(ctx *zedagentContext, uuid string,
	aiStatus *types.AppInstanceStatus,
	aa *types.AssignableAdapters, iteration int, dest destinationBitset)

This function is called per change, hence needs to try over all management ports When aiStatus is nil it means a delete and we send a message containing only the UUID to inform zedcloud about the delete.

func PublishAppInstMetaDataToZedCloud

func PublishAppInstMetaDataToZedCloud(ctx *zedagentContext,
	appInstMetadata *types.AppInstMetaData, isDelete bool,
	dest destinationBitset)

PublishAppInstMetaDataToZedCloud is called when an appInst reports its Metadata to EVE. AppInst metadata is relayed to the controller to be processed further.

func PublishBlobInfoToZedCloud

func PublishBlobInfoToZedCloud(ctx *zedagentContext, blobSha string,
	blobStatus *types.BlobStatus, iteration int, dest destinationBitset)

PublishBlobInfoToZedCloud is called per change, hence needs to try over all management ports When blob Status is nil it means a delete and we send a message containing only the UUID to inform zedcloud about the delete.

func PublishContentInfoToZedCloud

func PublishContentInfoToZedCloud(ctx *zedagentContext, uuid string,
	ctStatus *types.ContentTreeStatus, iteration int, dest destinationBitset)

PublishContentInfoToZedCloud is called per change, hence needs to try over all management ports When content tree Status is nil it means a delete and we send a message containing only the UUID to inform zedcloud about the delete.

func PublishDeviceInfoToZedCloud

func PublishDeviceInfoToZedCloud(ctx *zedagentContext, dest destinationBitset)

PublishDeviceInfoToZedCloud This function is called per change, hence needs to try over all management ports

func PublishEdgeviewToZedCloud

func PublishEdgeviewToZedCloud(ctx *zedagentContext,
	evStatus *types.EdgeviewStatus, dest destinationBitset)

PublishEdgeviewToZedCloud - publish Edgeview info to controller

func PublishHardwareInfoToZedCloud

func PublishHardwareInfoToZedCloud(ctx *zedagentContext, dest destinationBitset)

PublishHardwareInfoToZedCloud send ZInfoHardware message

func PublishVolumeToZedCloud

func PublishVolumeToZedCloud(ctx *zedagentContext, uuid string,
	volStatus *types.VolumeStatus, iteration int, dest destinationBitset)

PublishVolumeToZedCloud is called per change, hence needs to try over all management ports When volume status is nil it means a delete and we send a message containing only the UUID to inform zedcloud about the delete.

func Run

func Run(ps *pubsub.PubSub, loggerArg *logrus.Logger, logArg *base.LogObject, arguments []string) int

func SendProtobuf

func SendProtobuf(url string, buf *bytes.Buffer, size int64,
	iteration int) error

This function is called per change, hence needs to try over all management ports For each port we try different source IPs until we find a working one. For the HTTP errors indicating the object is gone we ignore the error so the caller does not defer and retry

Types

type DNSContext

type DNSContext struct {
	DNSinitialized bool // Received DeviceNetworkStatus
	// contains filtered or unexported fields
}

Context for handleDNSModify

type L2Adapter

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

L2Adapter is used to represent L2 Adapter (VLAN, bond) during configuration parsing.

type Notify

type Notify struct{}

Notify simple struct to pass notification messages

type TpmAgentImpl

type TpmAgentImpl struct{}

TpmAgentImpl implements zattest.TpmAgent interface

func (*TpmAgentImpl) SendInternalQuoteRequest

func (agent *TpmAgentImpl) SendInternalQuoteRequest(ctx *zattest.Context) error

SendInternalQuoteRequest implements SendInternalQuoteRequest method of zattest.TpmAgent

type VerifierImpl

type VerifierImpl struct{}

VerifierImpl implements zattest.Verifier interface

func (*VerifierImpl) SendAttestEscrow

func (server *VerifierImpl) SendAttestEscrow(ctx *zattest.Context) error

SendAttestEscrow implements SendAttestEscrow method of zattest.Verifier

func (*VerifierImpl) SendAttestQuote

func (server *VerifierImpl) SendAttestQuote(ctx *zattest.Context) error

SendAttestQuote implements SendAttestQuote method of zattest.Verifier

func (*VerifierImpl) SendNonceRequest

func (server *VerifierImpl) SendNonceRequest(ctx *zattest.Context) error

SendNonceRequest implements SendNonceRequest method of zattest.Verifier

type WatchdogImpl

type WatchdogImpl struct{}

WatchdogImpl implements zattest.Watchdog interface

func (*WatchdogImpl) PunchWatchdog

func (wd *WatchdogImpl) PunchWatchdog(ctx *zattest.Context) error

PunchWatchdog implements PunchWatchdog method of zattest.Watchdog

Jump to

Keyboard shortcuts

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