Versions in this module Expand all Collapse all v0 v0.9.82 Jan 31, 2021 Changes in this version + func GetResourceName(res types.Resource) string + func GetResourceReferences(resources map[string]types.ResourceWithTtl) map[string]bool + func GetResponseType(typeURL string) types.ResponseType + func IndexResourcesByName(items []types.ResourceWithTtl) map[string]types.ResourceWithTtl + 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) (value 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) (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) (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 + Heartbeat bool + Request *discovery.DiscoveryRequest + Resources []types.ResourceWithTtl + 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 ResourceWithTtl struct + Resources []types.Resource + Ttl *time.Duration + type Resources struct + Items map[string]types.ResourceWithTtl + Version string + func NewResources(version string, items []types.Resource) Resources + func NewResourcesWithTtl(version string, items []types.ResourceWithTtl) 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 NewSnapshotWithResources(version string, resources SnapshotResources) Snapshot + func NewSnapshotWithTtls(version string, endpoints []types.ResourceWithTtl, ...) Snapshot + func (s *Snapshot) Consistent() error + func (s *Snapshot) GetResources(typeURL string) map[string]types.Resource + func (s *Snapshot) GetResourcesAndTtl(typeURL string) map[string]types.ResourceWithTtl + 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 + func NewSnapshotCacheWithHeartbeating(ctx context.Context, ads bool, hash NodeHash, logger log.Logger, ...) SnapshotCache + type SnapshotResources struct + Clusters []types.Resource + Endpoints []types.Resource + ExtensionConfigs []types.Resource + Listeners []types.Resource + Routes []types.Resource + Runtimes []types.Resource + Secrets []types.Resource + type StatusInfo interface + GetLastWatchRequestTime func() time.Time + GetNode func() *core.Node + GetNumWatches func() int