Documentation
¶
Overview ¶
Package podman provides the Podman-compatible API server.
Index ¶
- type Artifact
- type Deps
- type ManifestEntry
- type ManifestList
- type ManifestManager
- func (mm *ManifestManager) Add(name, image string, platform Platform) error
- func (mm *ManifestManager) Annotate(name, image string, platform Platform) error
- func (mm *ManifestManager) Create(name string, images []string) (*ManifestList, error)
- func (mm *ManifestManager) Delete(name string) error
- func (mm *ManifestManager) Exists(name string) bool
- func (mm *ManifestManager) Inspect(name string) (*ManifestList, error)
- func (mm *ManifestManager) List() []*ManifestList
- func (mm *ManifestManager) Remove(name, image string) error
- type NetworkOptions
- type Platform
- type Pod
- type PodContainer
- type PodCreateConfig
- type PodManager
- func (pm *PodManager) AddContainerToPod(podID string, containerID, containerName string) error
- func (pm *PodManager) CreatePod(cfg *PodCreateConfig) (*Pod, error)
- func (pm *PodManager) Exists(nameOrID string) bool
- func (pm *PodManager) GetPod(nameOrID string) (*Pod, error)
- func (pm *PodManager) KillPod(nameOrID string, signal string) error
- func (pm *PodManager) ListPods() []*Pod
- func (pm *PodManager) PausePod(nameOrID string) error
- func (pm *PodManager) PrunePods() []string
- func (pm *PodManager) RemoveContainerFromPod(podID, containerIDOrName string) error
- func (pm *PodManager) RemovePod(nameOrID string, force bool) error
- func (pm *PodManager) RenamePod(nameOrID, newName string) error
- func (pm *PodManager) RestartPod(nameOrID string) error
- func (pm *PodManager) StartPod(nameOrID string) error
- func (pm *PodManager) StopPod(nameOrID string) error
- func (pm *PodManager) UnpausePod(nameOrID string) error
- type PodmanServer
- type PortBinding
- type Quadlet
- type Secret
- type SecretManager
- func (sm *SecretManager) Create(name string, data []byte, driver string, labels map[string]string) (*Secret, error)
- func (sm *SecretManager) Exists(nameOrID string) bool
- func (sm *SecretManager) Get(nameOrID string) (*Secret, error)
- func (sm *SecretManager) GetData(nameOrID string) ([]byte, error)
- func (sm *SecretManager) ListSecrets() []*Secret
- func (sm *SecretManager) Remove(nameOrID string) error
- type SecretSpec
- type VolumeStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deps ¶ added in v0.12.0
type Deps struct {
Runtime *dokiruntime.Runtime
Images *image.Store
Network *network.Manager
Volumes VolumeStore
Events *events.Bus
// Build, PlayKube and GenerateKube reuse the daemon's own handlers rather
// than reimplementing them here (P6/P7). They are function values because
// those handlers live in pkg/api, which imports this package.
Build http.HandlerFunc
PlayKube http.HandlerFunc
GenerateKube http.HandlerFunc
}
Deps carries the real engine components the libpod endpoints operate on. Before these were injected, PodmanServer held only its own metadata stores, so every container, image, volume and network endpoint had nothing to talk to and could only return fiction.
type ManifestEntry ¶
type ManifestList ¶
type ManifestManager ¶
type ManifestManager struct {
// contains filtered or unexported fields
}
func NewManifestManager ¶
func NewManifestManager(root string) (*ManifestManager, error)
func (*ManifestManager) Add ¶
func (mm *ManifestManager) Add(name, image string, platform Platform) error
func (*ManifestManager) Annotate ¶
func (mm *ManifestManager) Annotate(name, image string, platform Platform) error
func (*ManifestManager) Create ¶
func (mm *ManifestManager) Create(name string, images []string) (*ManifestList, error)
func (*ManifestManager) Delete ¶
func (mm *ManifestManager) Delete(name string) error
func (*ManifestManager) Exists ¶
func (mm *ManifestManager) Exists(name string) bool
func (*ManifestManager) Inspect ¶
func (mm *ManifestManager) Inspect(name string) (*ManifestList, error)
func (*ManifestManager) List ¶
func (mm *ManifestManager) List() []*ManifestList
func (*ManifestManager) Remove ¶
func (mm *ManifestManager) Remove(name, image string) error
type NetworkOptions ¶
type Pod ¶
type Pod struct {
ID string `json:"Id"`
Name string `json:"Name"`
Namespace string `json:"Namespace,omitempty"`
Created time.Time `json:"Created"`
Hostname string `json:"Hostname,omitempty"`
Labels map[string]string `json:"Labels,omitempty"`
State string `json:"State"`
Containers []PodContainer `json:"Containers"`
InfraID string `json:"InfraContainerId"`
CgroupPath string `json:"CgroupPath,omitempty"`
ExitPolicy string `json:"ExitPolicy,omitempty"`
Restart string `json:"Restart,omitempty"`
MemoryLimit int64 `json:"MemoryLimit,omitempty"`
ExitSignal string `json:"ExitSignal,omitempty"`
}
type PodContainer ¶
type PodCreateConfig ¶
type PodCreateConfig struct {
Name string `json:"name"`
Hostname string `json:"hostname,omitempty"`
DomainName string `json:"domainname,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
InfraImage string `json:"infra_image,omitempty"`
InfraCommand []string `json:"infra_command,omitempty"`
InfraName string `json:"infra_name,omitempty"`
PortBindings map[string][]PortBinding `json:"portmappings,omitempty"`
ExitPolicy string `json:"exit_policy,omitempty"`
MemoryLimit int64 `json:"memory_limit,omitempty"`
CPULimit float64 `json:"cpu_limit,omitempty"`
Restart string `json:"restart,omitempty"`
Networks map[string]NetworkOptions `json:"networks,omitempty"`
SecurityOpt []string `json:"security_opt,omitempty"`
NoInfra bool `json:"no_infra,omitempty"`
CgroupParent string `json:"cgroup_parent,omitempty"`
Pid string `json:"pid,omitempty"`
Userns string `json:"userns,omitempty"`
Uts string `json:"uts,omitempty"`
Volumes []string `json:"volumes,omitempty"`
DNSOptions []string `json:"dns_option,omitempty"`
DNSSearch []string `json:"dns_search,omitempty"`
DNServers []string `json:"dns_server,omitempty"`
HostAdd []string `json:"hostadd,omitempty"`
}
type PodManager ¶
type PodManager struct {
// contains filtered or unexported fields
}
func NewPodManager ¶
func NewPodManager(root string) (*PodManager, error)
func (*PodManager) AddContainerToPod ¶
func (pm *PodManager) AddContainerToPod(podID string, containerID, containerName string) error
func (*PodManager) CreatePod ¶
func (pm *PodManager) CreatePod(cfg *PodCreateConfig) (*Pod, error)
func (*PodManager) Exists ¶
func (pm *PodManager) Exists(nameOrID string) bool
func (*PodManager) ListPods ¶
func (pm *PodManager) ListPods() []*Pod
func (*PodManager) PausePod ¶
func (pm *PodManager) PausePod(nameOrID string) error
func (*PodManager) PrunePods ¶
func (pm *PodManager) PrunePods() []string
func (*PodManager) RemoveContainerFromPod ¶ added in v0.11.0
func (pm *PodManager) RemoveContainerFromPod(podID, containerIDOrName string) error
RemoveContainerFromPod removes a container from a pod by ID or name.
func (*PodManager) RenamePod ¶
func (pm *PodManager) RenamePod(nameOrID, newName string) error
func (*PodManager) RestartPod ¶
func (pm *PodManager) RestartPod(nameOrID string) error
func (*PodManager) StartPod ¶
func (pm *PodManager) StartPod(nameOrID string) error
func (*PodManager) StopPod ¶
func (pm *PodManager) StopPod(nameOrID string) error
func (*PodManager) UnpausePod ¶
func (pm *PodManager) UnpausePod(nameOrID string) error
type PodmanServer ¶
type PodmanServer struct {
// contains filtered or unexported fields
}
func NewPodmanServer ¶
func NewPodmanServer(root string, deps Deps) (*PodmanServer, error)
func (*PodmanServer) RegisterRoutes ¶
func (s *PodmanServer) RegisterRoutes(mux *http.ServeMux)
type PortBinding ¶
type SecretManager ¶
type SecretManager struct {
// contains filtered or unexported fields
}
func NewSecretManager ¶
func NewSecretManager(root string) (*SecretManager, error)
func (*SecretManager) Exists ¶
func (sm *SecretManager) Exists(nameOrID string) bool
func (*SecretManager) ListSecrets ¶
func (sm *SecretManager) ListSecrets() []*Secret
func (*SecretManager) Remove ¶
func (sm *SecretManager) Remove(nameOrID string) error
type SecretSpec ¶
type VolumeStore ¶ added in v0.12.0
type VolumeStore interface {
Create(name string, driver string, opts map[string]string, labels map[string]string) (*common.VolumeInfo, error)
Get(name string) (*common.VolumeInfo, error)
List() []*common.VolumeInfo
Remove(name string) error
Prune(referencedVolumes map[string]bool) ([]string, error)
}
VolumeStore is the slice of the daemon's volume manager that the libpod surface needs. It is an interface rather than the concrete type because the manager lives in pkg/api, which imports this package.
Click to show internal directories.
Click to hide internal directories.