rest

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 HealthResponse

type HealthResponse string

type HealthService

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

func NewHealthService

func NewHealthService(node *node.WakuNode, m *chi.Mux) *HealthService

type HistoryCursor

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
}

RelayService represents the REST service for WakuRelay

func NewRelayService

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

NewRelayService returns an instance of RelayService

func (*RelayService) Start

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

Start starts the RelayService

func (*RelayService) Stop

func (r *RelayService) Stop()

Stop stops the RelayService

type StoreResponse

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

type StoreService

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

func NewStoreService

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

type StoreWakuMessage

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, 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