rest

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const ROUTE_DEBUG_INFOV1 = "/debug/v1/info"
View Source
const ROUTE_DEBUG_VERSIONV1 = "/debug/v1/info"
View Source
const ROUTE_RELAY_MESSAGESV1 = "/relay/v1/messages/{topic}"
View Source
const ROUTE_RELAY_SUBSCRIPTIONSV1 = "/relay/v1/subscriptions"
View Source
const ROUTE_STORE_MESSAGESV1 = "/store/v1/messages"

Variables

This section is empty.

Functions

This section is empty.

Types

type Adder

type Adder func(msg *protocol.Envelope)

type DebugService

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

func NewDebugService

func NewDebugService(node *node.WakuNode, m *chi.Mux) *DebugService

type HistoryCursor added in v0.6.0

type HistoryCursor struct {
	PubsubTopic string `json:"pubsub_topic"`
	SenderTime  string `json:"sender_time"`
	StoreTime   string `json:"store_time"`
	Digest      []byte `json:"digest"`
}

type InfoArgs

type InfoArgs struct {
}

type InfoReply

type InfoReply struct {
	ENRUri          string   `json:"enrUri,omitempty"`
	ListenAddresses []string `json:"listenAddresses,omitempty"`
}

type RelayService

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

func NewRelayService

func NewRelayService(node *node.WakuNode, m *chi.Mux, cacheCapacity int, log *zap.Logger) *RelayService

func (*RelayService) Start

func (r *RelayService) Start(ctx context.Context)

func (*RelayService) Stop

func (r *RelayService) Stop()

type StoreResponse added in v0.6.0

type StoreResponse struct {
	Messages     []StoreWakuMessage `json:"messages"`
	Cursor       *HistoryCursor     `json:"cursor,omitempty"`
	ErrorMessage string             `json:"error_message,omitempty"`
}

type StoreService added in v0.6.0

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

func NewStoreService added in v0.6.0

func NewStoreService(node *node.WakuNode, m *chi.Mux) *StoreService

type StoreWakuMessage added in v0.6.0

type StoreWakuMessage struct {
	Payload      []byte `json:"payload"`
	ContentTopic string `json:"content_topic"`
	Version      int32  `json:"version"`
	Timestamp    int64  `json:"timestamp"`
	Meta         []byte `json:"meta"`
}

type VersionResponse

type VersionResponse string

type WakuRest

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

func NewWakuRest

func NewWakuRest(node *node.WakuNode, address string, port int, enableAdmin bool, enablePrivate bool, enablePProf bool, relayCacheCapacity int, log *zap.Logger) *WakuRest

func (*WakuRest) Start

func (r *WakuRest) Start(ctx context.Context, wg *sync.WaitGroup)

func (*WakuRest) Stop

func (r *WakuRest) Stop(ctx context.Context) error

Jump to

Keyboard shortcuts

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