service

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DecodeBodyFn = func(body io.Reader, v interface{}) error {
	return json.NewDecoder(body).Decode(v)
}

DecodeBodyFn reads the next JSON encoding of data and store the result in value pointed by v

View Source
var HTTPWrite = func(w *http.ResponseWriter, data []byte) (int, error) {
	(*w).WriteHeader(http.StatusOK)
	return (*w).Write([]byte(data))
}

HTTPWrite writes the data to the connection npart of any http request

View Source
var MarshalFn = func(v interface{}) ([]byte, error) {
	return json.Marshal(v)
}

MarshalFn returns the JSON encoding of v

View Source
var UnMarshalFn = func(data []byte, v interface{}) error {
	return json.Unmarshal(data, v)
}

UnMarshalFn parse the JSON encoding of data and the result in value pointed by v

Functions

func GetSecuredCipherSuites added in v1.9.0

func GetSecuredCipherSuites() (suites []uint16)

GetSecuredCipherSuites returns a set of secure cipher suites.

Types

type Service

type Service struct {
	VolumeFinder VolumeInfoGetter
	CertFile     string
	KeyFile      string
	Port         int
	Logger       *logrus.Logger
	EnableDebug  bool
}

Service contains data required by the service

func (*Service) Routes

func (s *Service) Routes() *mux.Router

Routes contains the list of routes for the service

func (*Service) Run

func (s *Service) Run() error

Run will start the service and listen for HTTP requests

type Table added in v1.12.0

type Table struct {
	Namespace               string `json:"namespace"`
	PersistentVolume        string `json:"persistent_volume"`
	Status                  string `json:"status"`
	PersistentVolumeClaim   string `json:"persistent_volume_claim"`
	CSIDriver               string `json:"csi_driver"`
	Created                 string `json:"created"`
	ProvisionedSize         string `json:"provisioned_size"`
	StorageClass            string `json:"storage_class"`
	StorageSystemVolumeName string `json:"storage_system_volume_name"`
	StoragePool             string `json:"storage_pool"`
	StorageSystem           string `json:"storage_system"`
	Protocol                string `json:"protocol"`
}

Table contains the

type VolumeInfoGetter

type VolumeInfoGetter interface {
	GetPersistentVolumes(ctx context.Context) ([]k8s.VolumeInfo, error)
}

VolumeInfoGetter is an interface used to get a list of volume information

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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