Versions in this module Expand all Collapse all v0 v0.9.8 Jun 18, 2021 Changes in this version + func GetResourceName(res types.Resource) string + func GetResourceReferences(resources map[string]types.Resource) map[string]bool + func GetResponseType(typeURL string) types.ResponseType + func IndexResourcesByName(items []types.Resource) map[string]types.Resource + func MarshalResource(resource types.Resource) (types.MarshaledResource, error) + type Cache interface + type ConfigFetcher interface + Fetch func(context.Context, *Request) (Response, error) + type ConfigWatcher interface + CreateWatch func(request *Request, responses chan<- Response) (cancel func()) + type IDHash struct + func (IDHash) ID(node *core.Node) string + type LinearCache struct + func NewLinearCache(typeURL string, opts ...LinearCacheOption) *LinearCache + func (cache *LinearCache) CreateWatch(request *Request, value chan<- Response) func() + func (cache *LinearCache) DeleteResource(name string) error + func (cache *LinearCache) Fetch(ctx context.Context, request *Request) (Response, error) + func (cache *LinearCache) NumWatches(name string) int + func (cache *LinearCache) UpdateResource(name string, res types.Resource) error + type LinearCacheOption func(*LinearCache) + func WithInitialResources(resources map[string]types.Resource) LinearCacheOption + func WithVersionPrefix(prefix string) LinearCacheOption + type MuxCache struct + Caches map[string]Cache + Classify func(Request) string + func (mux *MuxCache) CreateWatch(request *Request, value chan<- Response) func() + func (mux *MuxCache) Fetch(ctx context.Context, request *Request) (Response, error) + type NodeHash interface + ID func(node *core.Node) string + type PassthroughResponse struct + DiscoveryResponse *discovery.DiscoveryResponse + Request *discovery.DiscoveryRequest + func (r *PassthroughResponse) GetDiscoveryResponse() (*discovery.DiscoveryResponse, error) + func (r *PassthroughResponse) GetRequest() *discovery.DiscoveryRequest + func (r *PassthroughResponse) GetVersion() (string, error) + type RawResponse struct + Request *discovery.DiscoveryRequest + Resources []types.Resource + Version string + func (r *RawResponse) GetDiscoveryResponse() (*discovery.DiscoveryResponse, error) + func (r *RawResponse) GetRequest() *discovery.DiscoveryRequest + func (r *RawResponse) GetVersion() (string, error) + type Request = discovery.DiscoveryRequest + type Resources struct + Items map[string]types.Resource + Version string + func NewResources(version string, items []types.Resource) Resources + type Response interface + GetDiscoveryResponse func() (*discovery.DiscoveryResponse, error) + GetRequest func() *discovery.DiscoveryRequest + GetVersion func() (string, error) + type ResponseWatch struct + Request *Request + Response chan<- Response + type Snapshot struct + Resources [types.UnknownType]Resources + func NewSnapshot(version string, endpoints []types.Resource, clusters []types.Resource, ...) Snapshot + func (s *Snapshot) Consistent() error + func (s *Snapshot) GetResources(typeURL string) map[string]types.Resource + func (s *Snapshot) GetVersion(typeURL string) string + type SnapshotCache interface + ClearSnapshot func(node string) + GetSnapshot func(node string) (Snapshot, error) + GetStatusInfo func(string) StatusInfo + GetStatusKeys func() []string + SetSnapshot func(node string, snapshot Snapshot) error + func NewSnapshotCache(ads bool, hash NodeHash, logger log.Logger) SnapshotCache + type StatusInfo interface + GetLastWatchRequestTime func() time.Time + GetNode func() *core.Node + GetNumWatches func() int