util

package
v1.29.0-alpha.177 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DNSDataKeyFunc

func DNSDataKeyFunc(obj interface{}) (string, error)

DNSDataKeyFunc function for data uniq key

Types

type DataMeta

type DataMeta interface {
	GetName() string
	GetNamespace() string
	GetLabels() map[string]string
	GetAnnotations() map[string]string
}

DataMeta interface for operator namespace/name

type Decoder

type Decoder interface {
	Decode([]byte) (interface{}, error)
}

Decoder decoder for detail data type

type EndpointCache

type EndpointCache struct {
	Store cache.Store // Store for detail
}

EndpointCache cache for bcs-scheduler endpoint data

func (*EndpointCache) GetEndpointByService

func (ep *EndpointCache) GetEndpointByService(svc *bcstypes.BcsService) *bcstypes.BcsEndpoint

GetEndpointByService get endpoint info from BcsService

func (*EndpointCache) ListEndpoints

func (ep *EndpointCache) ListEndpoints() (epList []*bcstypes.BcsEndpoint)

ListEndpoints list all endpoints, change interface into *BcsEndpoint

type EndpointDecoder

type EndpointDecoder struct{}

EndpointDecoder decoder for EndpointCache

func (*EndpointDecoder) Decode

func (epd *EndpointDecoder) Decode(data []byte) (interface{}, error)

Decode implementation of Decoder

type ServiceCache

type ServiceCache struct {
	Store cache.Store
}

ServiceCache cache for bcs-scheduler service data

func (*ServiceCache) GetService

func (srv *ServiceCache) GetService(namespace, name string) *bcstypes.BcsService

GetService get Service by name and namespace

func (*ServiceCache) GetServiceByEndpoint

func (srv *ServiceCache) GetServiceByEndpoint(endpoint *bcstypes.BcsEndpoint) *bcstypes.BcsService

GetServiceByEndpoint get service info by Endpoint

type SvcDecoder

type SvcDecoder struct{}

SvcDecoder decoder for ServiceCache

func (*SvcDecoder) Decode

func (svcd *SvcDecoder) Decode(data []byte) (interface{}, error)

Decode implementation of Decoder

Jump to

Keyboard shortcuts

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