inventory

package
v0.16.0-a0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SnapshotPayloadSchemaVersion  uint32 = 1
	EvidenceSectionProviderStatus        = "akash.provider.v1.Status"
)
View Source
const NonceSize = 32

Variables

This section is empty.

Functions

func HashPayload

func HashPayload(payload []byte) []byte

func MarshalDeterministic

func MarshalDeterministic(msg proto.Message) ([]byte, error)

func ResourceSummaryFromCluster

func ResourceSummaryFromCluster(
	cluster inventoryv1.Cluster,
	activeLeases uint32,
	softwareVersion string,
	softwareSignature []byte,
	softwareIdentity *inventoryv1.SoftwareIdentity,
) inventoryv1.SnapshotResourceSummary

func ValidateNonce

func ValidateNonce(nonce []byte) error

func ValidateSnapshot

func ValidateSnapshot(snapshot *Snapshot) error

Types

type Builder

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

func NewBuilder

func NewBuilder(payload PayloadSource, signer ptypes.ProviderSigner) (*Builder, error)

func (*Builder) Build

func (b *Builder) Build(ctx context.Context, req SnapshotRequest) (*Snapshot, error)

type Collector

type Collector interface {
	Name() string
	Collect(context.Context) (EvidenceSection, error)
}

type EvidenceSection

type EvidenceSection struct {
	Name    string
	Payload []byte
}

type PayloadSource

type PayloadSource interface {
	Payload(context.Context, SnapshotRequest) ([]byte, error)
}

type Snapshot

type Snapshot struct {
	Payload   []byte
	Hash      []byte
	Signature []byte
	Provider  string
}

type SnapshotRequest

type SnapshotRequest struct {
	Nonce []byte
}

type StatusClient

type StatusClient interface {
	StatusV1(context.Context) (*providerv1.Status, error)
}

type StatusPayloadSource

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

func (*StatusPayloadSource) Payload

func (s *StatusPayloadSource) Payload(ctx context.Context, req SnapshotRequest) ([]byte, error)

type StatusPayloadSourceConfig

type StatusPayloadSourceConfig struct {
	Status            StatusClient
	Provider          string
	ChainID           string
	SoftwareVersion   string
	SoftwareSignature []byte
	SoftwareIdentity  *inventoryv1.SoftwareIdentity
	Now               func() time.Time
	Collectors        []Collector
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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