api

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 8 Imported by: 1

Documentation

Overview

Package api exposes application configurations via a gRPC API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Client configspec.ConfigAPIClient
}

Client wraps a configspec.ConfigAPIClient to unmarshal the server's responses into types that implement the core configkit Application and Handler interfaces.

func NewClient

func NewClient(conn grpc.ClientConnInterface) *Client

NewClient returns a new configuration client for the given connection.

func (*Client) ListApplications

func (c *Client) ListApplications(
	ctx context.Context,
) ([]configkit.Application, error)

ListApplications returns the configurations of the applications hosted by the server. The handler objects in the returned configuration are nil.

type Server added in v0.10.0

type Server struct {
	// contains filtered or unexported fields
}

Server is an implementation of configspec.ConfigAPIServer.

func NewServer added in v0.10.0

func NewServer(apps ...configkit.Application) *Server

NewServer returns an API server that serves the configuration of the given applications.

func (*Server) ListApplications added in v0.10.0

ListApplications returns the full configuration of all applications.

Jump to

Keyboard shortcuts

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