configmap

package
v2.2.0-beta.2+incompat... Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrKeyNotFound            = errors.New("key not found")
	ErrInvalidConfigMap       = errors.New("configMap name and namespase should be provided")
	ErrInvalidConfigMapKey    = errors.New("data key for configMap should be provided")
	ErrInvalidConfigMapClient = errors.New("configMap client should be provided")
)

Package specific errors:

Functions

func IsNotExist

func IsNotExist(err error) bool

IsNotExist returns a boolean indicating whether the error is known to report that kubernetes resource or known key isn't found.

Types

type CMFile

type CMFile struct {
	// contains filtered or unexported fields
}

CMFile represents a file on kubernetes ConfigMap.

func New

func New(cmName, ns, key string, client v1.ConfigMapsGetter) (*CMFile, error)

New creates the new CMFile.

func (CMFile) Info

func (f CMFile) Info() string

Info describes a file stored on kubernetes ConfigMap.

func (CMFile) Read

func (f CMFile) Read() ([]byte, error)

Read reads a file from the ConfigMap.

func (CMFile) Write

func (f CMFile) Write(data []byte) error

Write stores data to the ConfigMap. If provided ConfigMap doesn't exist it creates the new one.

Jump to

Keyboard shortcuts

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