serve

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package serve provides the `serve` command for the CLI. The command starts the server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command(builder Builder) *cobra.Command

Command returns the BindPlane serve cobra command

Types

type Builder

type Builder interface {
	// Build returns a new Server.
	BuildServer(ctx context.Context) (Server, error)
}

Builder is an interface for building a Server.

type Server

type Server interface {
	// Seed will seed the BindPlane server.
	Seed(ctx context.Context) error

	// Serve will run a BindPlane server until an error occurs or the context is canceled.
	Serve(ctx context.Context) error
}

Server is an interface for serving BindPlane.

func NewServer

func NewServer(cfg *config.Config, s store.Store, tracer tracer.Tracer, logger *zap.Logger, routeBuilder exposedserver.RouteBuilder) Server

NewServer returns a new Server.

Jump to

Keyboard shortcuts

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