Documentation
¶
Overview ¶
Package discovery implements the discovery service, which lets users surface resource configs for their machines to use.
Index ¶
Constants ¶
View Source
const (
SubtypeName = "discovery"
)
SubtypeName is the name of the type of service.
Variables ¶
View Source
var API = resource.APINamespaceRDK.WithServiceType(SubtypeName)
API is a variable that identifies the discovery resource API.
View Source
var ErrNilResponse = errors.New("discovery service returned a nil response")
ErrNilResponse is the error for when a nil response is returned from a discovery service.
Functions ¶
func NewRPCServiceServer ¶
func NewRPCServiceServer(coll resource.APIResourceCollection[Service]) interface{}
NewRPCServiceServer constructs a the discovery gRPC service server. It is intentionally untyped to prevent use outside of tests.
Types ¶
type Service ¶
type Service interface { resource.Resource DiscoverResources(ctx context.Context, extra map[string]any) ([]resource.Config, error) }
Service describes the functions that are available to the service.
func FromDependencies ¶
func FromDependencies(deps resource.Dependencies, name string) (Service, error)
FromDependencies is a helper for getting the named discovery service from a collection of dependencies.
Directories
¶
Path | Synopsis |
---|---|
Package fake implements a fake discovery service.
|
Package fake implements a fake discovery service. |
Package register registers all relevant discovery models and also API specific functions
|
Package register registers all relevant discovery models and also API specific functions |
Click to show internal directories.
Click to hide internal directories.