server

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

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 {

	// Required for all gRPC server implementations.
	spb.UnimplementedResourceDiscoveryServer
	// 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 server conf.

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.

func (*Server) RegisterWithGRPC

func (s *Server) RegisterWithGRPC(grpcServer *grpc.Server)

RegisterWithGRPC registers the RDS servers with the given gRPC server.

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.

Jump to

Keyboard shortcuts

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