inventory

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ScaleFactor = 5
)

Variables

View Source
var (
	ErrInvalidHostUUIDInput          = errors.New("invalid host UUID value")
	ErrInvalidInstanceIdInput        = errors.New("invalid instance id value")
	ErrInvalidWorkloadIdInput        = errors.New("invalid workload id value")
	ErrInvalidMachineIdInput         = errors.New("invalid machine id value")
	ErrInvalidTenantIdInput          = errors.New("invalid tenant id value")
	ErrInvalidClusterNameInput       = errors.New("invalid cluster name value")
	ErrInvalidInventoryResource      = errors.New("invalid inventory resource")
	ErrInvalidInstance               = errors.New("invalid instance")
	ErrInvalidWorkload               = errors.New("invalid workload")
	ErrInvalidWorkloadInput          = errors.New("invalid workload input values")
	ErrInvalidWorkloadMembers        = errors.New("invalid workload members")
	ErrInvalidWorkloadMembersInput   = errors.New("invalid workload members input values")
	ErrInvalidHost                   = errors.New("invalid host")
	ErrFailedInventoryGetHostByUuid  = errors.New("failed inventory getHostByUUID call")
	ErrFailedInventoryGetResource    = errors.New("failed inventory get resource call")
	ErrFailedInventoryCreateResource = errors.New("failed inventory create resource call")
	ErrFailedInventoryDeleteResource = errors.New("failed inventory delete resource call")
	ErrFailedInventoryGetResponse    = errors.New("failed inventory get resource call")
	ErrFailedInventoryGetHost        = errors.New("failed inventory resource getHost call")
)

Functions

This section is empty.

Types

type AddInstanceToWorkloadInput

type AddInstanceToWorkloadInput struct {
	TenantId   string
	WorkloadId string
	InstanceId string
}

type AddInstanceToWorkloadOutput

type AddInstanceToWorkloadOutput struct {
	Err error
}

type CreateWorkloadInput

type CreateWorkloadInput struct {
	TenantId    string
	ClusterName string
}

type CreateWorkloadOutput

type CreateWorkloadOutput struct {
	WorkloadId string
	Err        error
}

type DeauthorizeHostInput

type DeauthorizeHostInput struct {
	TenantId string
	HostUUID string
}

type DeauthorizeHostOutput

type DeauthorizeHostOutput struct {
	Err error
}

type DeleteInstanceFromWorkloadInput

type DeleteInstanceFromWorkloadInput struct {
	TenantId   string
	WorkloadId string
	InstanceId string
}

type DeleteInstanceFromWorkloadOutput

type DeleteInstanceFromWorkloadOutput struct {
	Err error
}

type DeleteWorkloadInput

type DeleteWorkloadInput struct {
	TenantId   string
	WorkloadId string
}

type DeleteWorkloadOutput

type DeleteWorkloadOutput struct {
	Err error
}

type GetInstanceByMachineIdInput

type GetInstanceByMachineIdInput struct {
	TenantId  string
	MachineId string
}

type GetInstanceByMachineIdOutput

type GetInstanceByMachineIdOutput struct {
	Host     *Host
	Instance *Instance
	Err      error
}

type GetWorkloadInput

type GetWorkloadInput struct {
	TenantId   string
	WorkloadId string
}

type GetWorkloadOutput

type GetWorkloadOutput struct {
	Workload *Workload
	Err      error
}

type Host

type Host struct {
	Id string
}

type Instance

type Instance struct {
	Id        string
	SerialNo  string
	Os        string
	MachineId string
}

type InventoryClient

type InventoryClient struct {
	Client client.TenantAwareInventoryClient
}

func NewInventoryClientWithOptions

func NewInventoryClientWithOptions(opt Options) (*InventoryClient, error)

type MachineProvider

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

func NewMachineProvider

func NewMachineProvider(wg *sync.WaitGroup, inventoryAddress string,
	enableTracing, enableMetrics bool, useStub bool) (*MachineProvider, error)

func (*MachineProvider) AddInstanceToWorkload

func (*MachineProvider) Close

func (n *MachineProvider) Close()

func (*MachineProvider) CreateWorkload

func (*MachineProvider) DeleteInstanceFromWorkload

func (*MachineProvider) DeleteWorkload

func (*MachineProvider) GetInstanceByMachineId

func (*MachineProvider) GetWorkload

type Options

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

type OptionsBuilder

type OptionsBuilder interface {
	WithWaitGroup(wg *sync.WaitGroup) OptionsBuilder
	WithInventoryAddress(address string) OptionsBuilder
	WithTracing(enableTracing bool) OptionsBuilder
	WithMetrics(enableMetrics bool) OptionsBuilder
	WithStub(useStub bool) OptionsBuilder
	Build() Options
}

func NewOptionsBuilder

func NewOptionsBuilder() OptionsBuilder

type Workload

type Workload struct {
	Id string
}

Jump to

Keyboard shortcuts

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