server

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	GRPCPort string
	GRPCHost string
	HTTPPort string
}

Config holds server configurations.

type Proverber

type Proverber interface {
	Proverb(context.Context) string
}

Proverber is a server that responds with a proverb.

type Server

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

Server implements a Proverber server.

func New

New returns a new instance of the Server.

func (Server) Proverb

func (srv Server) Proverb(ctx context.Context, req *rpc.ProverbRequest) (*rpc.ProverbResponse, error)

Proverb returns a Go proverb.

func (*Server) Shutdown

func (srv *Server) Shutdown(ctx context.Context) error

Shutdown initiates the graceful shutdown process.

func (*Server) StartGRPC

func (srv *Server) StartGRPC(ctx context.Context) error

StartGRPC starts the GRPC server.

func (*Server) StartGW

func (srv *Server) StartGW(ctx context.Context) error

StartGW starts the GRPC REST gateway.

Jump to

Keyboard shortcuts

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