grpcserver

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registration

type Registration interface {
	Name() string
	Register(*grpc.Server)
}

type Server

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

func NewServer

func NewServer(conf *ServerConf, services []Registration) *Server

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(ctx context.Context) error

type ServerConf

type ServerConf struct {
	Bindings   []string `gcfg:"listen"  json:"listen"`
	BindSocket string   `gcfg:"-" json:"-"`

	TLSConfig *tls.Config `gcfg:"-" json:"-"`
}

func (*ServerConf) BindAddrs

func (c *ServerConf) BindAddrs() ([]net.IP, error)

func (*ServerConf) Listeners

func (c *ServerConf) Listeners() ([]net.Listener, error)

Jump to

Keyboard shortcuts

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