server

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: MPL-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(opts ...Option) error

Run initializes and starts the server. This will block until the server exits (by cancelling the associated context set with WithContext or due to an unrecoverable error).

Types

type Option

type Option func(*options)

Option configures Run

func WithAuthentication

func WithAuthentication(ac server.AuthChecker) Option

WithAuthentication configures the server to require authentication.

func WithBrowserUI

func WithBrowserUI(enabled bool) Option

WithBrowserUI configures the server to enable the browser UI.

func WithContext

func WithContext(ctx context.Context) Option

WithContext sets the context for the server. When this context is cancelled, the server will be shut down.

func WithGRPC

func WithGRPC(ln net.Listener) Option

WithGRPC sets the GRPC listener. This listener must be closed manually by the caller. Prior to closing the listener, it is recommended that you cancel the context set with WithContext and wait for Run to return.

func WithHTTP

func WithHTTP(ln net.Listener) Option

WithHTTP sets the HTTP listener. This listener must be closed manually by the caller. Prior to closing the listener, it is recommended that you cancel the context set with WithContext and wait for Run to return.

If this is called multiple times, multiple HTTP listeners are started.

func WithImpl

func WithImpl(impl pb.WaypointServer) Option

WithImpl sets the service implementation to serve.

func WithLogger

func WithLogger(log hclog.Logger) Option

WithLogger sets the logger.

func WithTelemetry added in v0.6.0

func WithTelemetry(enabled bool) Option

WithTelemetry instructs the server to export OpenCensus traces for requests.

Directories

Path Synopsis
Package state manages the state that the singleprocess server has, providing operations to mutate that state safely as needed.
Package state manages the state that the singleprocess server has, providing operations to mutate that state safely as needed.
Package component has component implementations for the various resulting types.
Package component has component implementations for the various resulting types.
Package httpapi implements the shared endpoints that are implemented over the HTTP protocol rather than gRPC.
Package httpapi implements the shared endpoints that are implemented over the HTTP protocol rather than gRPC.

Jump to

Keyboard shortcuts

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