topology

package
v0.0.0-...-d96e350 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "clutch.service.topology"

Variables

This section is empty.

Functions

func New

func New(cfg *any.Any, logger *zap.Logger, scope tally.Scope) (service.Service, error)

Types

type CacheableTopology

type CacheableTopology interface {
	CacheEnabled() bool

	// Notably the cache TTL is provided, this information can be used to ensure
	// all active resources are added to the cache more often than the cache TTL.
	StartTopologyCaching(ctx context.Context, ttl time.Duration) (<-chan *topologyv1.UpdateCacheRequest, error)
}

CacheableTopology is implemented by a service that wishes to enable the topology API feature set

By implementing this interface the topology service will automatically setup all services which implement it. Automatically ingesting Resource objects via the `GetTopologyObjectChannel()` function. This enables users to make use of the Topology APIs with these new Topology Resources.

type Service

type Service interface {
	GetTopology(ctx context.Context) error
	Search(ctx context.Context, search *topologyv1.SearchRequest) ([]*topologyv1.Resource, string, error)
	Autocomplete(ctx context.Context, typeURL, search string, limit uint64, caseSensitive bool) ([]*topologyv1.Resource, error)
}

Jump to

Keyboard shortcuts

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