server

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Failed

func Failed(c *gin.Context, err error)

func Success

func Success(c *gin.Context, data interface{})

Types

type Option

type Option func(*Options)

func Branch added in v1.0.5

func Branch(branch string) Option

func Built added in v1.0.5

func Built(built string) Option

func Commit added in v1.0.5

func Commit(commit string) Option

func HTTPAddr

func HTTPAddr(addr string) Option

func MetadataPath

func MetadataPath(path string) Option

func Version added in v1.0.5

func Version(version string) Option

type Options

type Options struct {
	HTTPAddr     string
	MetadataPath string
	Version      string
	Branch       string
	Commit       string
	Built        string
}

type Server

type Server struct {
	*service.Service
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) (*Server, error)

func (*Server) Serve

func (c *Server) Serve() error

func (*Server) Stop

func (c *Server) Stop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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