grpc

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackgroundServer

type BackgroundServer struct {
	*grpc.Server
	// contains filtered or unexported fields
}

BackgroundServer wrapper

func NewServer

func NewServer(opts ...Options) *BackgroundServer

NewServer instance

func (*BackgroundServer) GetName

func (s *BackgroundServer) GetName() string

GetName of the task

func (*BackgroundServer) GetSeverity

func (s *BackgroundServer) GetSeverity() background.ProcessSeverity

GetSeverity of the task

func (*BackgroundServer) OnStart

func (s *BackgroundServer) OnStart(_ context.Context) error

OnStart event to be called when main loop will be started

func (*BackgroundServer) OnStop

func (s *BackgroundServer) OnStop(_ context.Context) error

OnStop event to be called when main loop will be started

type Options

type Options func(o *BackgroundServer)

Options sets options such as credentials, keepalive parameters, etc.

func AddOptions

func AddOptions(opts ...grpc.ServerOption) Options

AddOptions for gRPC server

func SetAddress

func SetAddress(a string) Options

SetAddress custom value

func SetListener

func SetListener(l net.Listener) Options

SetListener custom value

func SetNetwork

func SetNetwork(n string) Options

SetNetwork custom value

func SetTimeout

func SetTimeout(t time.Duration) Options

SetTimeout custom value

Jump to

Keyboard shortcuts

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