types

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AutoPlatform = &Platform{}

Functions

func GetPlatforms

func GetPlatforms(platform Platform) []string

func SameError

func SameError(err1, err2 error) bool

Function to compare error messages by prefix

Types

type Binding

type Binding struct {
	Host      PortBinding
	Container PortBinding
}

type CommitOptions

type CommitOptions struct {
	Reference string
	Comment   string
	Changes   []string
}

type Container

type Container struct {
	ID      string
	Names   []string
	Image   string
	ImageID string
}

type ContainerConfig

type ContainerConfig struct {
	Cmd          []string
	Entrypoint   []string
	Env          []string // List of environment variable to set in the container
	ExposedPorts []Binding
	Image        string // Name of the image as it was passed by the operator (e.g. could be symbolic)
	Name         string
	Platform     *Platform
	Readiness    *ReadinessProbe `json:"-"`
	Tty          bool            // Attach standard streams to a tty, including stdin if it is not closed.
	User         string          // User that will run the command(s) inside the container, also support user:group
	Volumes      []Volume        // List of volumes (mounts) used for the container
	WorkingDir   string          // Current directory (PWD) in the command will be launched
	Memory       int64
	CPU          uint64
	Script       string
}

type ImageInfo

type ImageInfo struct {
	ID       string
	Platform *PlatformSpec
}

type Platform

type Platform struct {
	Host      *PlatformSpec
	Container *PlatformSpec
}

func GetPlatformSpec

func GetPlatformSpec() *Platform

func NewPlatform

func NewPlatform(os, arch, variant string) *Platform

func (*Platform) Same

func (p *Platform) Same() bool

type PlatformSpec

type PlatformSpec ocispec.Platform

func GetContainerPlatform

func GetContainerPlatform(host *PlatformSpec) *PlatformSpec

func GetContainerPlatform2

func GetContainerPlatform2(host *PlatformSpec) *PlatformSpec

func GetImagePlatform

func GetImagePlatform(host *PlatformSpec) *PlatformSpec

func ParsePlatform

func ParsePlatform(platform string) *PlatformSpec

func ParsePlatforms added in v0.10.0

func ParsePlatforms(platforms ...string) []*PlatformSpec

func (*PlatformSpec) String

func (p *PlatformSpec) String() string

func (*PlatformSpec) ToOrg

func (p *PlatformSpec) ToOrg() *ocispec.Platform

type PortBinding

type PortBinding struct {
	IP   string
	Port string
}

func (PortBinding) String added in v0.7.0

func (p PortBinding) String() string

type ReadinessProbe

type ReadinessProbe struct {
	Endpoint string
	Timeout  time.Duration
	Validate func([]byte) bool
}

type Volume

type Volume struct {
	Type    string
	Source  string
	Target  string
	Options []string
}

Jump to

Keyboard shortcuts

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