cache

package
v0.4.13 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCephBlockPoolListWatch

func CreateCephBlockPoolListWatch(cephClient rookclient.Interface, namespace, fieldSelector string) cache.ListerWatcher

func CreatePersistentVolumeListWatch

func CreatePersistentVolumeListWatch(kubeClient clientset.Interface, fieldSelector string) cache.ListerWatcher

Types

type CephBlocklistLs added in v0.4.13

type CephBlocklistLs struct {
	IP    string    `json:"ip"`
	Port  int       `json:"port"`
	Nonce int       `json:"nonce"`
	Until time.Time `json:"until"`
}

func (*CephBlocklistLs) UnmarshalJSON added in v0.4.13

func (c *CephBlocklistLs) UnmarshalJSON(data []byte) error

type CephBlocklistStore added in v0.4.13

type CephBlocklistStore struct {
	Mutex sync.RWMutex
	Store []CephBlocklistLs
	// contains filtered or unexported fields
}

func NewCephBlocklistStore added in v0.4.13

func NewCephBlocklistStore(opts *options.Options) *CephBlocklistStore

func (*CephBlocklistStore) Add added in v0.4.13

func (c *CephBlocklistStore) Add(obj interface{}) error

func (*CephBlocklistStore) Delete added in v0.4.13

func (c *CephBlocklistStore) Delete(obj interface{}) error

func (*CephBlocklistStore) Get added in v0.4.13

func (c *CephBlocklistStore) Get(obj interface{}) (item interface{}, exists bool, err error)

func (*CephBlocklistStore) GetByKey added in v0.4.13

func (c *CephBlocklistStore) GetByKey(key string) (item interface{}, exists bool, err error)

func (*CephBlocklistStore) IsBlocked added in v0.4.13

func (c *CephBlocklistStore) IsBlocked(ip string, port, nonce int) bool

func (*CephBlocklistStore) List added in v0.4.13

func (c *CephBlocklistStore) List() []interface{}

func (*CephBlocklistStore) ListKeys added in v0.4.13

func (c *CephBlocklistStore) ListKeys() []string

func (*CephBlocklistStore) Replace added in v0.4.13

func (c *CephBlocklistStore) Replace(list []interface{}, _ string) error

func (*CephBlocklistStore) Resync added in v0.4.13

func (c *CephBlocklistStore) Resync() error

func (*CephBlocklistStore) Update added in v0.4.13

func (c *CephBlocklistStore) Update(obj interface{}) error

type Clients added in v0.4.13

type Clients struct {
	Watchers []Watcher `json:"watchers,omitempty"`
}

type PersistentVolumeAttributes

type PersistentVolumeAttributes struct {
	PersistentVolumeName           string
	PersistentVolumeClaimName      string
	PersistentVolumeClaimNamespace string
	ImageName                      string
	Pool                           string
}

type PersistentVolumeStore

type PersistentVolumeStore struct {
	Mutex sync.RWMutex
	// Store is a map of PV UID to PersistentVolumeAttributes
	Store map[types.UID]PersistentVolumeAttributes
	// RBDClientMap is a map of RBD client addresses to the names of the nodes whose images had this client as a watcher
	RBDClientMap map[string][]string
	// contains filtered or unexported fields
}

PersistentVolumeStore implements the k8s.io/client-go/tools/cache.Store interface. It stores persistent volume CSI attributes

func NewPersistentVolumeStore

func NewPersistentVolumeStore(opts *options.Options) *PersistentVolumeStore

func (*PersistentVolumeStore) Add

func (p *PersistentVolumeStore) Add(obj interface{}) error

Add inserts to the PersistentVolumeStore.

func (*PersistentVolumeStore) Delete

func (p *PersistentVolumeStore) Delete(obj interface{}) error

Delete deletes an existing entry in the PersistentVolumeStore.

func (*PersistentVolumeStore) Get

func (p *PersistentVolumeStore) Get(obj interface{}) (item interface{}, exists bool, err error)

Get implements the Get method of the store interface.

func (*PersistentVolumeStore) GetByKey

func (p *PersistentVolumeStore) GetByKey(key string) (item interface{}, exists bool, err error)

GetByKey implements the GetByKey method of the store interface.

func (*PersistentVolumeStore) List

func (p *PersistentVolumeStore) List() []interface{}

List implements the List method of the store interface.

func (*PersistentVolumeStore) ListKeys

func (p *PersistentVolumeStore) ListKeys() []string

ListKeys implements the ListKeys method of the store interface.

func (*PersistentVolumeStore) Replace

func (p *PersistentVolumeStore) Replace(list []interface{}, _ string) error

Replace will delete the contents of the store, using instead the given list.

func (*PersistentVolumeStore) Resync

func (p *PersistentVolumeStore) Resync() error

Resync implements the Resync method of the store interface.

func (*PersistentVolumeStore) Update

func (p *PersistentVolumeStore) Update(obj interface{}) error

Update updates the existing entry in the PersistentVolumeStore.

type RBDMirrorDaemonService

type RBDMirrorDaemonService struct {
	ServiceID  string `json:"service_id"`
	InstanceID string `json:"instance_id"`
	DaemonID   string `json:"daemon_id"`
	Hostname   string `json:"hostname"`
}

type RBDMirrorDaemonStatus

type RBDMirrorDaemonStatus struct {
	ServiceID   string `json:"service_id"`
	InstanceID  string `json:"instance_id"`
	ClientID    string `json:"client_id"`
	Hostname    string `json:"hostname"`
	CephVersion string `json:"ceph_version"`
	Leader      bool   `json:"leader"`
	Health      string `json:"health"`
}

type RBDMirrorImageStatus

type RBDMirrorImageStatus struct {
	Name          string                 `json:"name"`
	GlobalID      string                 `json:"global_id"`
	State         string                 `json:"state"`
	Description   string                 `json:"description"`
	DaemonService RBDMirrorDaemonService `json:"daemon_service"`
	LastUpdate    string                 `json:"last_update"`
	PeerSites     []RBDMirrorPeerSite    `json:"peer_sites"`
}

type RBDMirrorImageStatusStates

type RBDMirrorImageStatusStates struct {
	Unknown        int `json:"unknown"`
	Error          int `json:"error"`
	Syncing        int `json:"syncing"`
	StartingReplay int `json:"starting_replay"`
	Replaying      int `json:"replaying"`
	StoppingReplay int `json:"stopping_replay"`
	Stopped        int `json:"stopped"`
}

type RBDMirrorPeerSite

type RBDMirrorPeerSite struct {
	SiteName    string `json:"site_name"`
	MirrorUuids string `json:"mirror_uuids"`
	State       string `json:"state"`
	Description string `json:"description"`
	LastUpdate  string `json:"last_update"`
}

type RBDMirrorPeerSiteDescription

type RBDMirrorPeerSiteDescription struct {
	BytesPerSecond          float64 `json:"bytes_per_second"`
	BytesPerSnapshot        float64 `json:"bytes_per_snapshot"`
	LocalSnapshotTimestamp  int64   `json:"local_snapshot_timestamp"`
	RemoteSnapshotTimestamp int64   `json:"remote_snapshot_timestamp"`
	ReplayState             string  `json:"replay_state"`
}

type RBDMirrorPoolStatusSummary

type RBDMirrorPoolStatusSummary struct {
	Health       string                     `json:"health"`
	DaemonHealth string                     `json:"daemon_health"`
	ImageHealth  string                     `json:"image_health"`
	States       RBDMirrorImageStatusStates `json:"states"`
}

type RBDMirrorPoolStatusVerbose

type RBDMirrorPoolStatusVerbose struct {
	PoolName      string
	PoolNamespace string
	MirrorStatus  RBDMirrorStatusVerbose
}

type RBDMirrorStatusVerbose

type RBDMirrorStatusVerbose struct {
	Summary RBDMirrorPoolStatusSummary `json:"summary"`
	Daemons []RBDMirrorDaemonStatus    `json:"daemons"`
	Images  []RBDMirrorImageStatus     `json:"images"`
}

type RBDMirrorStore

type RBDMirrorStore struct {
	Mutex sync.RWMutex
	// Store is a map of Pool UID to RBDMirrorPoolStatusVerbose
	Store map[types.UID]RBDMirrorPoolStatusVerbose
	// contains filtered or unexported fields
}

RBDMirrorStore implements the k8s.io/client-go/tools/cache.Store interface. It stores rbd mirror data.

func NewRBDMirrorStore

func NewRBDMirrorStore(opts *options.Options) *RBDMirrorStore

func (*RBDMirrorStore) Add

func (s *RBDMirrorStore) Add(obj interface{}) error

func (*RBDMirrorStore) Delete

func (s *RBDMirrorStore) Delete(obj interface{}) error

func (*RBDMirrorStore) Get

func (s *RBDMirrorStore) Get(obj interface{}) (item interface{}, exists bool, err error)

func (*RBDMirrorStore) GetByKey

func (s *RBDMirrorStore) GetByKey(key string) (item interface{}, exists bool, err error)

func (*RBDMirrorStore) List

func (s *RBDMirrorStore) List() []interface{}

func (*RBDMirrorStore) ListKeys

func (s *RBDMirrorStore) ListKeys() []string

func (*RBDMirrorStore) Replace

func (s *RBDMirrorStore) Replace(list []interface{}, _ string) error

func (*RBDMirrorStore) Resync

func (s *RBDMirrorStore) Resync() error

func (*RBDMirrorStore) Update

func (s *RBDMirrorStore) Update(obj interface{}) error

func (*RBDMirrorStore) WithRBDCommandInput

func (s *RBDMirrorStore) WithRBDCommandInput(namespace string) error

type Watcher added in v0.4.13

type Watcher struct {
	Address string      `json:"address,omitempty"`
	Client  int         `json:"client,omitempty"`
	Cookie  json.Number `json:"cookie,omitempty"`
}

Jump to

Keyboard shortcuts

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