ops

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2022 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package ops encapsulates the lifecycle of Boundary's ops-purpose listeners and servers: Creating, setting them up, starting and shutdown.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server is a collection of all state required to serve multiple ops endpoints through a single object.

func NewServer

func NewServer(l hclog.Logger, c *controller.Controller, listeners ...*base.ServerListener) (*Server, error)

NewServer iterates through all the listeners and sets up HTTP Servers for each, along with individual handlers. If Controller is set-up, NewServer will set-up a health endpoint for it.

func (*Server) Shutdown

func (s *Server) Shutdown() error

Shutdown attempts to cleanly shutdown all running ops listeners and HTTP servers.

func (*Server) Start

func (s *Server) Start()

Starts all goroutines that were set-up in NewServer. These goroutines start the HTTP Servers on the appropriate listeners (as defined by the bundle).

func (*Server) WaitIfHealthExists

func (s *Server) WaitIfHealthExists(d time.Duration, ui cli.Ui)

WaitIfHealthExists waits for a configurable period of time `d` if the health endpoint has been configured (i.e the Controller exists and ops listeners have been set-up)

Jump to

Keyboard shortcuts

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