Documentation ¶
Overview ¶
Package server is responsible for starting the grpc and http server.
Index ¶
- type API
- func (a *API) Create(_ context.Context, in *discoveryv1.CreateRequest) (*discoveryv1.CreateResponse, error)
- func (a *API) Info(_ context.Context, in *discoveryv1.InfoRequest) (*discoveryv1.InfoResponse, error)
- func (a *API) ListNamespace(_ context.Context, _ *discoveryv1.ListNamespaceRequest) (*discoveryv1.ListNamespaceResponse, error)
- func (a *API) ListServer(_ context.Context, _ *discoveryv1.ListServerRequest) (*discoveryv1.ListServerResponse, error)
- func (a *API) ListService(_ context.Context, req *discoveryv1.ListServiceRequest) (*discoveryv1.ListServiceResponse, error)
- func (a *API) RegisterNamespace(_ context.Context, req *discoveryv1.RegisterNamespaceRequest) (*discoveryv1.RegisterNamespaceResponse, error)
- func (a *API) RegisterServer(_ context.Context, req *discoveryv1.RegisterServerRequest) (*discoveryv1.RegisterServerResponse, error)
- func (a *API) RegisterService(ctx context.Context, req *discoveryv1.RegisterServiceRequest) (*discoveryv1.RegisterServiceResponse, error)
- func (a *API) UnRegisterService(ctx context.Context, req *discoveryv1.UnRegisterServiceRequest) (*discoveryv1.UnRegisterServiceResponse, error)
- func (a *API) UnregisterNamespace(_ context.Context, req *discoveryv1.UnregisterNamespaceRequest) (*discoveryv1.UnregisterNamespaceResponse, error)
- func (a *API) UnregisterServer(_ context.Context, req *discoveryv1.UnregisterServerRequest) (*discoveryv1.UnregisterServerResponse, error)
- type Config
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API implements the GRPC API.
func (*API) Create ¶
func (a *API) Create(_ context.Context, in *discoveryv1.CreateRequest) (*discoveryv1.CreateResponse, error)
Create creates an access token.
func (*API) Info ¶
func (a *API) Info(_ context.Context, in *discoveryv1.InfoRequest) (*discoveryv1.InfoResponse, error)
Info gives token information.
func (*API) ListNamespace ¶
func (a *API) ListNamespace(_ context.Context, _ *discoveryv1.ListNamespaceRequest) (*discoveryv1.ListNamespaceResponse, error)
ListNamespace lists all namespaces.
func (*API) ListServer ¶
func (a *API) ListServer(_ context.Context, _ *discoveryv1.ListServerRequest) (*discoveryv1.ListServerResponse, error)
ListServer lists all servers.
func (*API) ListService ¶
func (a *API) ListService(_ context.Context, req *discoveryv1.ListServiceRequest) (*discoveryv1.ListServiceResponse, error)
ListService lists all services.
func (*API) RegisterNamespace ¶
func (a *API) RegisterNamespace(_ context.Context, req *discoveryv1.RegisterNamespaceRequest) (*discoveryv1.RegisterNamespaceResponse, error)
RegisterNamespace registers a server.
func (*API) RegisterServer ¶
func (a *API) RegisterServer(_ context.Context, req *discoveryv1.RegisterServerRequest) (*discoveryv1.RegisterServerResponse, error)
RegisterServer registers a server.
func (*API) RegisterService ¶
func (a *API) RegisterService(ctx context.Context, req *discoveryv1.RegisterServiceRequest) (*discoveryv1.RegisterServiceResponse, error)
RegisterService registers a service.
func (*API) UnRegisterService ¶
func (a *API) UnRegisterService(ctx context.Context, req *discoveryv1.UnRegisterServiceRequest) (*discoveryv1.UnRegisterServiceResponse, error)
UnRegisterService unregisters a service.
func (*API) UnregisterNamespace ¶
func (a *API) UnregisterNamespace(_ context.Context, req *discoveryv1.UnregisterNamespaceRequest) (*discoveryv1.UnregisterNamespaceResponse, error)
UnregisterNamespace unregisters a namespace.
func (*API) UnregisterServer ¶
func (a *API) UnregisterServer(_ context.Context, req *discoveryv1.UnregisterServerRequest) (*discoveryv1.UnregisterServerResponse, error)
UnregisterServer unregisters a server.
type Config ¶
type Config struct { PrometheusRegistry prometheus.Registerer NumReplicas int GRPCListenAddr string HTTPListenAddr string TokenIssuer string TokenSecretKey string OIDCClient string OIDCRoles []string OIDCURL string Transport http.RoundTripper }
Config configures the discovery server.
Click to show internal directories.
Click to hide internal directories.