subscribe_server

package
v0.0.0-...-2f87fcc Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: GPL-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_RETRY_INTERVAL = 5 * time.Second // in second
	RPC_SERVER_BUFFER_SIZE = 200
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SubscribeRpcServer

type SubscribeRpcServer struct {
	// Configs
	ServiceConfig *config.Config
	// Clients
	// DAOs
	// Channel
	FanInChannel chan *daemon.StreamingMessage
	// Services
	CleanerService    *daemon.Cleaner
	ReminderService   *daemon.Reminder
	InvestmentService *daemon.Investment

	services.UnimplementedDaemonServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(ctx context.Context) *SubscribeRpcServer

func (*SubscribeRpcServer) HealthCheck

func (*SubscribeRpcServer) StartDispatcher

func (s *SubscribeRpcServer) StartDispatcher()

Start a go routine to dispatch all incoming messages, each of them is going to be sent via one of registered RPC sessions, we pick next available session in a round robin manner

func (*SubscribeRpcServer) Stop

func (s *SubscribeRpcServer) Stop()

func (*SubscribeRpcServer) SubscribeNotification

func (s *SubscribeRpcServer) SubscribeNotification(
	requestMsg *types.SubscribeNotificationMsg,
	stream services.Daemon_SubscribeNotificationServer,
) error

Jump to

Keyboard shortcuts

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