cache

package
v4.0.0-...-1d6235c Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 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

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

func (*CephBlocklistLs) UnmarshalJSON

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

type CephBlocklistStore

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

func NewCephBlocklistStore

func NewCephBlocklistStore(opts *options.Options) *CephBlocklistStore

func (*CephBlocklistStore) Add

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

func (*CephBlocklistStore) Delete

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

func (*CephBlocklistStore) Get

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

func (*CephBlocklistStore) GetByKey

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

func (*CephBlocklistStore) IsBlocked

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

func (*CephBlocklistStore) List

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

func (*CephBlocklistStore) ListKeys

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

func (*CephBlocklistStore) Replace

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

func (*CephBlocklistStore) Resync

func (c *CephBlocklistStore) Resync() error

func (*CephBlocklistStore) Update

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

type Clients

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(_ interface{}) (item interface{}, exists bool, err error)

Get implements the Get method of the store interface.

func (*PersistentVolumeStore) GetByKey

func (p *PersistentVolumeStore) GetByKey(_ 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 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(_ interface{}) (item interface{}, exists bool, err error)

func (*RBDMirrorStore) GetByKey

func (s *RBDMirrorStore) GetByKey(_ 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

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