api

package
v0.0.0-...-50815b3 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

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 defines the API server. It is primarily a REST interface through which service.Service can be accessed.

func New

func New(logger *zap.SugaredLogger, opts CoreOpts) (*API, error)

New creates a new API server - start it using Run(). Returns a callback to close connection

func (*API) Run

func (a *API) Run(host, port string, opts RunOpts) error

Run spins up the API server

func (*API) Stop

func (a *API) Stop()

Stop releases resources and shuts down the API server

type CoreOpts

type CoreOpts struct {
	Host     string
	Port     string
	CertFile string
	Token    string
}

CoreOpts defines options for connecting to pinpoint-core

type RunOpts

type RunOpts struct {
	CertFile string
	KeyFile  string
	Token    string
}

RunOpts defines options for API server startup

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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