Documentation
¶
Index ¶
- Variables
- func Init(logLevel int) error
- func NewSettings(volumeContext map[string]string) (orasSettings, error)
- type Mounter
- type MounterInterface
- type OrasHandler
- func (mnt *OrasHandler) BindMount(source string, target string, options ...string) error
- func (mnt *OrasHandler) BindUMount(target string) error
- func (mnt *OrasHandler) CreateMountVolume(volumeId string) error
- func (mnt *OrasHandler) CreateVolume(volumeId string, size int64) error
- func (mnt *OrasHandler) DeleteVolume(volumeId string) error
- func (mnt *OrasHandler) HostPathTo(to string) string
- func (mnt *OrasHandler) HostPathToLogs() string
- func (mnt *OrasHandler) HostPathToMountVolume(volumeId string) string
- func (mnt *OrasHandler) HostPathToVolume(volumeId string) string
- func (mnt *OrasHandler) HostPluginDataPath() string
- func (mnt *OrasHandler) OrasPathToVolume(settings orasSettings) (string, error)
- func (mnt *OrasHandler) OrasPull(artifactRoot string, settings orasSettings) error
- func (mnt *OrasHandler) SetOrasLogging()
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultEnableLogging = true
)
Functions ¶
func NewSettings ¶
NewSettings parses volume attributes and returns the settings
Types ¶
type Mounter ¶
type Mounter struct {
MounterInterface
}
type MounterInterface ¶
type OrasHandler ¶
type OrasHandler struct {
// contains filtered or unexported fields
}
func NewOrasHandler ¶
func NewOrasHandler(rootPath, pluginDataPath string, enforceNamespaces bool, name string, num ...int) *OrasHandler
NewOrasHandler creates a new oras handles to mount a container URI, pulled once
func (*OrasHandler) BindMount ¶
func (mnt *OrasHandler) BindMount(source string, target string, options ...string) error
func (*OrasHandler) BindUMount ¶
func (mnt *OrasHandler) BindUMount(target string) error
func (*OrasHandler) CreateMountVolume ¶
func (mnt *OrasHandler) CreateMountVolume(volumeId string) error
func (*OrasHandler) CreateVolume ¶
func (mnt *OrasHandler) CreateVolume(volumeId string, size int64) error
func (*OrasHandler) DeleteVolume ¶
func (mnt *OrasHandler) DeleteVolume(volumeId string) error
Delete a volume (this isn't currently used, we need to design concept of cleanup)
func (*OrasHandler) HostPathTo ¶
func (mnt *OrasHandler) HostPathTo(to string) string
func (*OrasHandler) HostPathToLogs ¶
func (mnt *OrasHandler) HostPathToLogs() string
func (*OrasHandler) HostPathToMountVolume ¶
func (mnt *OrasHandler) HostPathToMountVolume(volumeId string) string
func (*OrasHandler) HostPathToVolume ¶
func (mnt *OrasHandler) HostPathToVolume(volumeId string) string
HostPathToVolume returns absoluthe path to given volumeId on host mountpoint
func (*OrasHandler) HostPluginDataPath ¶
func (mnt *OrasHandler) HostPluginDataPath() string
func (*OrasHandler) OrasPathToVolume ¶
func (mnt *OrasHandler) OrasPathToVolume(settings orasSettings) (string, error)
OrasPathToVolume ensures the artifact exists, and returns it
func (*OrasHandler) OrasPull ¶
func (mnt *OrasHandler) OrasPull(artifactRoot string, settings orasSettings) error
Pull the oras container to the plugin data directory Derived from https://github.com/sajayantony/csi-driver-host-path/blob/1bcc9d435d0c3ccd93fa1855e8669aad0f3bd1b5/pkg/oci/oci.go We are working on this plugin together
func (*OrasHandler) SetOrasLogging ¶
func (mnt *OrasHandler) SetOrasLogging()
SetOrasLogging sets up logging for the oras plugin
Click to show internal directories.
Click to hide internal directories.