Skip to content

v1alpha1

import "github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1"

Overview

+k8s:deepcopy-gen=package +k8s:openapi-gen=true

Index

Package files

dmid.go doc.go image.go net.go size.go

Variables

var EmptySize = NewSizeFromBytes(0)

type DMID

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

DMID specifies the format for device mapper IDs

func NewDMID

func NewDMID(i int) DMID

func NewPoolDMID

func NewPoolDMID() DMID

func (DMID) Index

func (d DMID) Index() int

func (*DMID) Pool

func (d *DMID) Pool() bool

func (DMID) String

func (d DMID) String() string

type IPAddresses

type IPAddresses []net.IP

IPAddresses represents a list of VM IP addresses

func (IPAddresses) String

func (i IPAddresses) String() string

type OCIContentID

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

func ParseOCIContentID

func ParseOCIContentID(str string) (*OCIContentID, error)

ParseOCIContentID takes in a string to parse into an *OCIContentID If given a local Docker SHA like “sha256:3285f65b2651c68b5316e7a1fbabd30b5ae47914ac5791ac4bb9d59d029b924b”, it will be parsed into the local format, encoded as “docker://”. Given a full repo digest, such as “weaveworks/ignite-ubuntu@sha256:3285f65b2651c68b5316e7a1fbabd30b5ae47914ac5791ac4bb9d59d029b924b”, it will be parsed into the OCI registry format, encoded as “oci://@”.

func (*OCIContentID) Digest

func (o *OCIContentID) Digest() digest.Digest

Digest gets the digest of the content ID

func (*OCIContentID) Local

func (o *OCIContentID) Local() bool

Local returns true if the image has no repoName, i.e. it’s not available from a registry

func (*OCIContentID) MarshalJSON

func (o *OCIContentID) MarshalJSON() ([]byte, error)

func (*OCIContentID) RepoDigest

func (o *OCIContentID) RepoDigest() (n reference.Named)

RepoDigest returns a repo digest based on the OCIContentID if it is not local

func (*OCIContentID) SchemeString

func (o *OCIContentID) SchemeString() string

Scheme returns the string representation with the scheme prefix

func (*OCIContentID) String

func (o *OCIContentID) String() string

String returns the string representation for either format

func (*OCIContentID) UnmarshalJSON

func (o *OCIContentID) UnmarshalJSON(b []byte) (err error)

type OCIImageRef

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

OCIImageRef is a struct containing a names and tagged reference by which an OCI runtime can identify an image to retrieve.

func NewOCIImageRef

func NewOCIImageRef(imageStr string) (o OCIImageRef, err error)

NewOCIImageRef parses and normalizes a reference to an OCI (docker) image.

func (OCIImageRef) IsUnset

func (i OCIImageRef) IsUnset() bool

func (OCIImageRef) MarshalJSON

func (i OCIImageRef) MarshalJSON() ([]byte, error)

func (OCIImageRef) Normalized

func (i OCIImageRef) Normalized() string

Normalized returns the normalized reference, e.g. “docker.io/weaveworks/ignite-ubuntu:latest”

func (OCIImageRef) Ref

func (i OCIImageRef) Ref() reference.NamedTagged

Ref parses the internal strings to a reference.NamedTagged

func (OCIImageRef) String

func (i OCIImageRef) String() string

String returns the familiar form of the reference, e.g. “weaveworks/ignite-ubuntu:latest”

func (*OCIImageRef) UnmarshalJSON

func (i *OCIImageRef) UnmarshalJSON(b []byte) (err error)

type PortMapping

type PortMapping struct {
    BindAddress net.IP   `json:"bindAddress,omitempty"`
    HostPort    uint64   `json:"hostPort"`
    VMPort      uint64   `json:"vmPort"`
    Protocol    Protocol `json:"protocol,omitempty"`
}

PortMapping defines a port mapping between the VM and the host

func (PortMapping) String

func (p PortMapping) String() string

type PortMappings

type PortMappings []PortMapping

PortMappings represents a list of port mappings

func ParsePortMappings

func ParsePortMappings(input []string) (PortMappings, error)

func (PortMappings) String

func (p PortMappings) String() string

type Protocol

type Protocol string

Protocol specifies a network port protocol

const (
    ProtocolTCP Protocol = "tcp"
    ProtocolUDP Protocol = "udp"
)

func (Protocol) String

func (p Protocol) String() string

func (*Protocol) UnmarshalJSON

func (p *Protocol) UnmarshalJSON(b []byte) (err error)

type Size

type Size struct {
    datasize.ByteSize
}

Size specifies a common unit for data sizes

func NewSizeFromBytes

func NewSizeFromBytes(bytes uint64) Size

func NewSizeFromSectors

func NewSizeFromSectors(sectors uint64) Size

func NewSizeFromString

func NewSizeFromString(str string) (Size, error)

func (Size) Add

func (s Size) Add(other Size) Size

Add returns a copy, does not modify the receiver

func (*Size) MarshalJSON

func (s *Size) MarshalJSON() ([]byte, error)

func (Size) Max

func (s Size) Max(other Size) Size

func (Size) Min

func (s Size) Min(other Size) Size

func (Size) Sectors

func (s Size) Sectors() uint64

func (Size) String

func (s Size) String() string

Override ByteSize’s default string implementation which results in .HR() without spaces

func (*Size) UnmarshalJSON

func (s *Size) UnmarshalJSON(b []byte) error

Generated by godoc2md