grpc

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: May 29, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(address string) (*grpcsdk.ClientConn, error)

NewClient creates a new client

Types

type Server

type Server struct {
	*grpcsdk.Server

	// Listener is the listener to use
	Listener net.Listener
}

Server is a object that holds the state of the server

func NewServer

func NewServer(serverName string, options *ServerOptions) (*Server, error)

NewServer creates a new server

func (*Server) Start

func (s *Server) Start() error

Start starts the server

func (*Server) Stop

func (s *Server) Stop() error

Stop stops the server

type ServerOptions

type ServerOptions struct {
	// Port is the port to listen on
	Port string
}

ServerOptions holds the options for the server

func NewDefaultServerOptions

func NewDefaultServerOptions() *ServerOptions

NewDefaultServerOptions returns a new set of default options

Jump to

Keyboard shortcuts

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