counts

package
v2.0.0-...-1d53c46 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(schemas *types.APISchemas, ccache clustercache.ClusterCache)

Register registers a new count schema. This schema isn't a true resource but instead returns counts for other resources

Types

type Count

type Count struct {
	ID     string               `json:"id,omitempty"`
	Counts map[string]ItemCount `json:"counts"`
}

type ItemCount

type ItemCount struct {
	Summary    Summary            `json:"summary,omitempty"`
	Namespaces map[string]Summary `json:"namespaces,omitempty"`
	Revision   int                `json:"-"`
}

func (*ItemCount) DeepCopy

func (i *ItemCount) DeepCopy() *ItemCount

type Store

type Store struct {
	empty.Store
	// contains filtered or unexported fields
}

func (*Store) ByID

func (s *Store) ByID(apiOp *types.APIRequest, schema *types.APISchema, id string) (types.APIObject, error)

func (*Store) List

func (s *Store) List(apiOp *types.APIRequest, schema *types.APISchema) (types.APIObjectList, error)

func (*Store) Watch

func (s *Store) Watch(apiOp *types.APIRequest, schema *types.APISchema, w types.WatchRequest) (chan types.APIEvent, error)

Watch creates a watch for the Counts schema. This returns only the counts which have changed since the watch was established

type Summary

type Summary struct {
	Count         int            `json:"count,omitempty"`
	States        map[string]int `json:"states,omitempty"`
	Error         int            `json:"errors,omitempty"`
	Transitioning int            `json:"transitioning,omitempty"`
}

func (*Summary) DeepCopy

func (s *Summary) DeepCopy() *Summary

Jump to

Keyboard shortcuts

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