listener

package
v2.19.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Addr string        `yaml:"address" json:"address"`
	TLS  server.Config `yaml:"tls" json:"tls"`
}

func (*Config) Validate

func (c *Config) Validate() error

type Server

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

Server handles gRPC requests to the service.

func New

func New(config Config, fileWatcher *fsnotify.Watcher, logger log.Logger) (*Server, error)

NewServer instantiates a listen server. When passing addr with an unspecified port or ":", use Addr().

func (*Server) Accept

func (s *Server) Accept() (net.Conn, error)

func (*Server) AddCloseFunc

func (s *Server) AddCloseFunc(f func())

AddCloseFunc adds a function to be called by the Close method. This eliminates the need for wrapping the Server.

func (*Server) Addr

func (s *Server) Addr() net.Addr

func (*Server) Close

func (s *Server) Close() error

Jump to

Keyboard shortcuts

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