server

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2017 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 {
	ListenAddress string
}

Config contains all configuration for the server

type Server

type Server struct {
	Config *Config
	RPC    *grpc.Server
}

Server contains all methods and config for the server

func NewServer

func NewServer(cfg *Config) *Server

NewServer returns a new instance of the server

func (*Server) GetVersion

func (server *Server) GetVersion(ctx context.Context, _ *google_protobuf.Empty) (*rpc.Version, error)

GetVersion returns the current version of the server.

func (*Server) Serve

func (server *Server) Serve(ctx context.Context) error

Serve starts the server and listens on ListenAddress

func (*Server) ServerStream

func (server *Server) ServerStream(_ *google_protobuf.Empty, stream rpc.GRPC_ServerStreamServer) error

ServerStream starts a new stream from the server

Jump to

Keyboard shortcuts

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