server

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: Apache-2.0 Imports: 6 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

func Branch(branch string) Option

func Built

func Built(built string) Option

func Commit

func Commit(commit string) Option

func HTTPAddr

func HTTPAddr(addr string) Option

func MetadataPath

func MetadataPath(path string) Option

func Version

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()

Jump to

Keyboard shortcuts

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