multiplex

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 2 more Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EndpointCacheURL is cached url
	EndpointCacheURL = "/api/v1/endpoints"
)
View Source
const (
	// NodeCacheURL is cached url
	NodeCacheURL = "/api/v1/nodes"
)
View Source
const (
	// serviceCacheURL is cached url
	ServiceCacheURL = "/api/v1/services"
)

Variables

This section is empty.

Functions

func RegisterMux

func RegisterMux(url string, mux CacheMux)

func RegisterMuxFactory

func RegisterMuxFactory(url string, f CacheMuxFactory)

Types

type CacheMux

type CacheMux interface {
	Name() string
	// Match check the resource url if need multiplex
	Match(method, URLPath string) bool
	// Watch return a event chan from upstream apiserver
	Watch(bookmark bool, ResourceVersion string) (watch.Interface, error)
	// ListObjects list object from informer store, labels filter in store.ListAll
	// field filter will in downstream
	ListObjects(selector labels.Selector, appendFn cache.AppendFunc) error
}

func CreateMux

func CreateMux(url, hostname string, informerFactory informers.SharedInformerFactory) (CacheMux, error)

func GetMux

func GetMux(url string) (CacheMux, error)

func NewEndpointMux

func NewEndpointMux(hostname string, informerFactory informers.SharedInformerFactory) (CacheMux, error)

NewEndpointMux ...

func NewNodeMux

func NewNodeMux(hostname string, informerFactory informers.SharedInformerFactory) (CacheMux, error)

NewNodeMux ...

func NewServiceMux

func NewServiceMux(hostname string, informerFactory informers.SharedInformerFactory) (CacheMux, error)

NewserviceMux ...

type CacheMuxFactory

type CacheMuxFactory interface {
	Create(hostname string, informerFactory informers.SharedInformerFactory) (CacheMux, error)
}

func GetMuxFactory

func GetMuxFactory(url string) (CacheMuxFactory, error)

Jump to

Keyboard shortcuts

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