grpc

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2019 License: MIT Imports: 10 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 {
	Port           string
	Component      string
	PeriodicMemory time.Duration
}

Config configuration for GRPC server

type Registration

type Registration func(server *grpc.Server)

Registration used to register a grpc Service

type Server

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

Server is a multiplexed server that adds a default HTTP1.1 healthcheck

func New

func New(config Config) *Server

New constructor function for the gRPC server

func (*Server) Add

func (g *Server) Add(registration Registration)

Add add a GRPC registration method GRPC register will be generated automatically using a proto file use this method to add different server registrars to a grpc.Server

func (*Server) PeriodicFree

func (g *Server) PeriodicFree(d time.Duration)

PeriodicFree returns memory to OS given a span of time

func (*Server) Start

func (g *Server) Start() error

Start will start serving on the GRPC server and block further execution should prefebly run inside a goroutine

Jump to

Keyboard shortcuts

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