hostpath

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Copyright 2021 The hostpath provisioner Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2021 The hostpath provisioner Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2021 The hostpath provisioner Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	TopologyKeyNode = "topology.hostpath.csi/node"
)

Variables

This section is empty.

Functions

func CreateVolume

func CreateVolume(base, volID string) error

CreateVolume allocates creates the directory for the hostpath volume

It returns the err if one occurs. That error is suitable as result of a gRPC call.

func DeleteVolume

func DeleteVolume(base, volID string) error

DeleteVolume deletes the directory for the hostpath volume.

func IndexOfStartingToken added in v0.11.0

func IndexOfStartingToken(value string, list []string) int

IndexOfStartingToken returns the index of a matching string, or -1 if not found

func NewHostPathController

func NewHostPathController(config *Config) *hostPathController

func NewHostPathDriver

func NewHostPathDriver(ctx context.Context, cfg *Config, dataDir string) (*hostPath, error)

func NewHostPathIdentity

func NewHostPathIdentity(config *Config) *hostPathIdentity

func NewHostPathNode

func NewHostPathNode(config *Config) *hostPathNode

func NewNonBlockingGRPCServer

func NewNonBlockingGRPCServer() *nonBlockingGRPCServer

func RunPrometheusServer added in v0.13.0

func RunPrometheusServer(metricsAddr string)

RunPrometheusServer runs a prometheus server for metrics

Types

type Config

type Config struct {
	DriverName             string
	Endpoint               string
	NodeID                 string
	StoragePoolDataDir     map[string]string
	DefaultStoragePoolName string
	Version                string
	Mounter                mount.Interface
}

type FileSystems

type FileSystems struct {
	Filsystem []MountPointInfo `json:"filesystems"`
}

type MountPointInfo

type MountPointInfo struct {
	Target  string `json:"target"`
	Source  string `json:"source"`
	FsType  string `json:"fstype"`
	Options string `json:"options"`
}

type StoragePoolInfo added in v0.11.0

type StoragePoolInfo struct {
	Name string `json:"name"`
	Path string `json:"path"`
}

StoragePoolInfo contains the name and path of a storage pool.

Jump to

Keyboard shortcuts

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