server

package
v1.0.194 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EphemeralStorage added in v0.1.73

func EphemeralStorage() ephemeralStorageOption

EphemeralStorage instructs SHAR to use memory rather than disk for storage. This is not recommended for production use.

func PanicRecovery added in v0.1.171

func PanicRecovery(enabled bool) panicOption

PanicRecovery enables or disables SHAR's ability to recover from server panics. This is on by default, and disabling it is not recommended for production use.

Types

type Option added in v0.1.86

type Option interface {
	// contains filtered or unexported methods
}

Option represents a SHAR server option

type Server

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

func New

func New(log *zap.Logger, options ...Option) *Server

New creates a new SHAR server. Leave the exporter nil if telemetry is not required

func (*Server) Listen

func (s *Server) Listen(natsURL string, grpcPort int)

Listen starts the GRPC server for both serving requests, and thw GRPC health endpoint.

func (*Server) Ready added in v0.1.66

func (s *Server) Ready() bool

func (*Server) Shutdown added in v0.1.66

func (s *Server) Shutdown()

Shutdown gracefully shuts down the GRPC server, and requests that

Jump to

Keyboard shortcuts

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