rpc

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrokerRpcServer

type BrokerRpcServer struct {
	Config            *models.BrokerConfig
	Storage           storage.Storage
	SubscriberOffsets models.SubscriberOffsets
	Mutex             sync.Mutex
	Server            *Server
}

func (*BrokerRpcServer) GetMessages

func (b *BrokerRpcServer) GetMessages(req *models.GetMessageRequest) ([]*models.Message, error)

func (*BrokerRpcServer) PublishMessage

func (b *BrokerRpcServer) PublishMessage(msg *models.Message) error

PublishMessage publishes a message to a topic

func (*BrokerRpcServer) Start

func (b *BrokerRpcServer) Start() error

Start runs the broker server

type Server

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

func NewRpcServer

func NewRpcServer(br *BrokerRpcServer) *Server

func (*Server) GetMessages

func (r *Server) GetMessages(req *models.GetMessageRequest, reply *models.MessageList) error

func (*Server) Publish

func (r *Server) Publish(msg *models.Message, reply *string) error

func (*Server) Register

func (r *Server) Register() error

Jump to

Keyboard shortcuts

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