domain

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InterfaceRedundancySingle           = "Single"
	InterfaceRedundancyHighAvailability = "HighAvailability"
	InterfaceRedundancyNone             = "None"
)

Variables

This section is empty.

Functions

func MachineAlreadyCreated

func MachineAlreadyCreated() errors.BusinessError

func NewMachineCreatedDomainEvent

func NewMachineCreatedDomainEvent(
	machineID MachineID,
) base.DomainEvent

func NewMachineInterface

func NewMachineInterface(
	interfaceName string,
	systemName string,
	chassisID string,
	portID string,
	portDescription string,
) metalv1alpha4.Interface

Types

type Loopbacks

type Loopbacks struct {
	IPv4 ipdomain.Address
	IPv6 ipdomain.Address
}

type Machine

type Machine struct {
	base.DomainEntity

	ID           MachineID
	UUID         string
	Namespace    string
	ASN          uint32
	SKU          string
	SerialNumber string
	Interfaces   []metalv1alpha4.Interface
	Loopbacks    Loopbacks
	Size         map[string]string
}

func CreateMachine

func CreateMachine(
	idGenerator MachineIDGenerator,
	machineAlreadyExist MachineAlreadyExist,
	UUID string,
	namespace string,
	SKU string,
	serialNumber string,
	interfaces []metalv1alpha4.Interface,
	loopbacks Loopbacks,
	size map[string]string,
) (Machine, errors.BusinessError)

func NewMachine

func NewMachine(
	ID MachineID,
	UUID string,
	namespace string,
	ASN uint32,
	SKU string,
	serialNumber string,
	interfaces []metalv1alpha4.Interface,
	loopbacks Loopbacks,
	size map[string]string,
) Machine

func (*Machine) SetMachineSizes

func (m *Machine) SetMachineSizes(sizes map[string]string)

type MachineAlreadyExist

type MachineAlreadyExist interface {
	Invoke(machineUUID string) bool
}

type MachineCreatedDomainEvent

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

func (*MachineCreatedDomainEvent) ID

func (*MachineCreatedDomainEvent) Type

type MachineID

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

func NewMachineID

func NewMachineID(id string) MachineID

func (*MachineID) String

func (m *MachineID) String() string

type MachineIDGenerator

type MachineIDGenerator interface {
	Generate() MachineID
}

Jump to

Keyboard shortcuts

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