hostsstore

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package hoststore provides the interface for /var/lib/nerdctl/<ADDRHASH>/etchosts . Prioritize simplicity over scalability.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllocHostsFile added in v0.6.1

func AllocHostsFile(dataStore, ns, id string) (string, error)

AllocHostsFile is used for creating mount-bindable /etc/hosts file. The file is initialized with no content.

func DeallocHostsFile added in v0.6.1

func DeallocHostsFile(dataStore, ns, id string) error

func HostsPath

func HostsPath(dataStore, ns, id string) string

HostsPath returns "/var/lib/nerdctl/<ADDRHASH>/etchosts/<NS>/<ID>/hosts"

Types

type Meta

type Meta struct {
	Namespace string
	ID        string
	Networks  map[string]*cni.CNIResult
	Hostname  string
	Name      string
}

type Store

type Store interface {
	Acquire(Meta) error
	Release(ns, id string) error
}

func NewStore

func NewStore(dataStore string) (Store, error)

Jump to

Keyboard shortcuts

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