api

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxContentTopicNameSize = 300

	// 1048576 - 300 - 62 = 1048214
	MaxMessageSize = pubsub.DefaultMaxMessageSize - MaxContentTopicNameSize - 62
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	proto.UnimplementedMessageApiServer
	// contains filtered or unexported fields
}

func NewService

func NewService(
	log *zap.Logger,
	store *store.Store,
	natsServer *server.Server,
	publishToWakuRelay func(context.Context, *wakupb.WakuMessage) error,
) (s *Service, err error)

func (*Service) BatchQuery

func (s *Service) BatchQuery(
	ctx context.Context,
	req *proto.BatchQueryRequest,
) (*proto.BatchQueryResponse, error)

func (*Service) Close

func (s *Service) Close()

func (*Service) HandleIncomingWakuRelayMessage

func (s *Service) HandleIncomingWakuRelayMessage(msg *wakupb.WakuMessage) error

func (*Service) Publish

func (s *Service) Publish(
	ctx context.Context,
	req *proto.PublishRequest,
) (*proto.PublishResponse, error)

func (*Service) Query

func (s *Service) Query(
	ctx context.Context,
	req *proto.QueryRequest,
) (*proto.QueryResponse, error)

func (*Service) Subscribe

func (s *Service) Subscribe(
	req *proto.SubscribeRequest,
	stream proto.MessageApi_SubscribeServer,
) error

func (*Service) Subscribe2

func (s *Service) Subscribe2(stream proto.MessageApi_Subscribe2Server) error

func (*Service) SubscribeAll

func (s *Service) SubscribeAll(
	req *proto.SubscribeAllRequest,
	stream proto.MessageApi_SubscribeAllServer,
) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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