Documentation ¶
Overview ¶
Package server provides a ResourceDiscovery gRPC server implementation. It can either be used a standalone server, using the binary in the "cmd" subdirectory, or it can run as a part of the cloudprober binary.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider interface {
ListResources(req *pb.ListResourcesRequest) (*pb.ListResourcesResponse, error)
}
Provider is a resource provider, e.g. GCP provider.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements a ResourceDiscovery gRPC server.
func New ¶
func New(initCtx context.Context, c *configpb.ServerConf, providers map[string]Provider, l *logger.Logger) (*Server, error)
New creates a new instance of the ResourceDiscovery Server using the provided config and returns it. It also creates a net.Listener on the configured port so that we can catch port conflict errors early. TODO(manugarg): Now that we have a global gRPC server, change New() to take *grpc.Server as an argument and provide it at the time of RDS server initialization.
func (*Server) ListResources ¶
func (s *Server) ListResources(ctx context.Context, req *pb.ListResourcesRequest) (*pb.ListResourcesResponse, error)
ListResources implements the ListResources method of the ResourceDiscovery service.
Directories ¶
Path | Synopsis |
---|---|
This binary implements a stand-alone ResourceDiscovery server.
|
This binary implements a stand-alone ResourceDiscovery server. |
Package filter implements common filters for the RDS (resource discovery service) providers.
|
Package filter implements common filters for the RDS (resource discovery service) providers. |
Package gcp implements a GCP (Google Compute Platform) resources provider for ResourceDiscovery server.
|
Package gcp implements a GCP (Google Compute Platform) resources provider for ResourceDiscovery server. |