Help us shape the future of Go! Take the 2026 Go Developer Survey

flexvolume

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2017 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package flexvolume implements utility code for Kubernetes flexvolumes.

https://github.com/kubernetes/kubernetes/pull/13840 https://github.com/kubernetes/kubernetes/tree/master/examples/flexvolume

Package flexvolume is a generated protocol buffer package.

It is generated from these files:

pkg/flexvolume/flexvolume.proto

It has these top-level messages:

AttachRequest
DetachRequest
MountRequest
UnmountRequest

Package flexvolume is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToJSONOptions

func BytesToJSONOptions(value []byte) (map[string]string, error)

BytesToJSONOptions converts a JSON string to a map of JSON options.

func JSONOptionsToBytes

func JSONOptionsToBytes(jsonOptions map[string]string) ([]byte, error)

JSONOptionsToBytes converts a map of JSON Options to a JSON string.

func RegisterAPIHandler

func RegisterAPIHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterAPIHandler registers the http handlers for service API to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterAPIHandlerFromEndpoint

func RegisterAPIHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterAPIHandlerFromEndpoint is same as RegisterAPIHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterAPIServer

func RegisterAPIServer(s *grpc.Server, srv APIServer)

Types

type APIClient

func NewAPIClient

func NewAPIClient(cc *grpc.ClientConn) APIClient

func NewLocalAPIClient

func NewLocalAPIClient(apiServer APIServer) APIClient

NewLocalAPIClient returns a new APIClient for the given APIServer.

type APIServer

func NewAPIServer

func NewAPIServer(client Client) APIServer

NewAPIServer returns a new APIServer for the given Client.

type AttachRequest

type AttachRequest struct {
	JsonOptions map[string]string `` /* 161-byte string literal not displayed */
}

func (*AttachRequest) Descriptor

func (*AttachRequest) Descriptor() ([]byte, []int)

func (*AttachRequest) GetJsonOptions

func (m *AttachRequest) GetJsonOptions() map[string]string

func (*AttachRequest) ProtoMessage

func (*AttachRequest) ProtoMessage()

func (*AttachRequest) Reset

func (m *AttachRequest) Reset()

func (*AttachRequest) String

func (m *AttachRequest) String() string

type Client

type Client interface {
	Init() error
	Attach(jsonOptions map[string]string) error
	Detach(mountDevice string, unmountBeforeDetach bool) error
	Mount(targetMountDir string, mountDevice string, jsonOptions map[string]string) error
	Unmount(mountDir string) error
}

Client is the client for a flexvolume implementation.

It is both called from the wrapper cli tool, and implemented by a given implementation.

func NewClient

func NewClient(apiClient APIClient) Client

NewClient returns a new Client for the given APIClient.

type DetachRequest

type DetachRequest struct {
	MountDevice string `protobuf:"bytes,1,opt,name=mount_device,json=mountDevice" json:"mount_device,omitempty"`
}

func (*DetachRequest) Descriptor

func (*DetachRequest) Descriptor() ([]byte, []int)

func (*DetachRequest) GetMountDevice

func (m *DetachRequest) GetMountDevice() string

func (*DetachRequest) ProtoMessage

func (*DetachRequest) ProtoMessage()

func (*DetachRequest) Reset

func (m *DetachRequest) Reset()

func (*DetachRequest) String

func (m *DetachRequest) String() string

type MountRequest

type MountRequest struct {
	TargetMountDir string            `protobuf:"bytes,1,opt,name=target_mount_dir,json=targetMountDir" json:"target_mount_dir,omitempty"`
	MountDevice    string            `protobuf:"bytes,2,opt,name=mount_device,json=mountDevice" json:"mount_device,omitempty"`
	JsonOptions    map[string]string `` /* 161-byte string literal not displayed */
}

func (*MountRequest) Descriptor

func (*MountRequest) Descriptor() ([]byte, []int)

func (*MountRequest) GetJsonOptions

func (m *MountRequest) GetJsonOptions() map[string]string

func (*MountRequest) GetMountDevice

func (m *MountRequest) GetMountDevice() string

func (*MountRequest) GetTargetMountDir

func (m *MountRequest) GetTargetMountDir() string

func (*MountRequest) ProtoMessage

func (*MountRequest) ProtoMessage()

func (*MountRequest) Reset

func (m *MountRequest) Reset()

func (*MountRequest) String

func (m *MountRequest) String() string

type UnmountRequest

type UnmountRequest struct {
	MountDir string `protobuf:"bytes,1,opt,name=mount_dir,json=mountDir" json:"mount_dir,omitempty"`
}

func (*UnmountRequest) Descriptor

func (*UnmountRequest) Descriptor() ([]byte, []int)

func (*UnmountRequest) GetMountDir

func (m *UnmountRequest) GetMountDir() string

func (*UnmountRequest) ProtoMessage

func (*UnmountRequest) ProtoMessage()

func (*UnmountRequest) Reset

func (m *UnmountRequest) Reset()

func (*UnmountRequest) String

func (m *UnmountRequest) String() string

Directories

Path Synopsis
cmd
flexvolume command

Jump to

Keyboard shortcuts

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