srv

package
v0.0.0-...-8bebc79 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2016 License: MIT Imports: 7 Imported by: 4

Documentation

Index

Constants

View Source
const (
	API_VERSION = "v0"
	DOCS_ROUTE  = "/docs/"
)

Variables

This section is empty.

Functions

func ConfigureGRPC

func ConfigureGRPC(opts Opts) (*grpc.Server, error)

ConfigureGRPC configures a GRPC Server w/ the given opts

func NewGRPC

func NewGRPC(incpts ...Interceptor) *grpc.Server

NewGRPC builds a grpc.Server w/ the given inceptors registered in order

Types

type Gateway

type Gateway struct {
	Address string
	Routes  []Route
}

func (Gateway) Mux

func (gw Gateway) Mux() http.Handler

func (Gateway) Serve

func (gw Gateway) Serve() error

type Interceptor

type Interceptor interface {
	HandleUnary(context.Context, interface{}, *grpc.UnaryServerInfo, grpc.UnaryHandler) (interface{}, error)
	HandleStream(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error
}

type Opts

type Opts struct {
	Address string
	Auth    auth.Opts
}

type Route

type Route struct {
	Path    string
	Handler http.Handler
}

type Service

type Service interface {
	Listen() error
	Name() string
	Version() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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