rest

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: MIT Imports: 30 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 AdminService added in v0.9.0

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

func NewAdminService added in v0.9.0

func NewAdminService(node *node.WakuNode, m *chi.Mux, log *zap.Logger) *AdminService

type DebugService

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

func NewDebugService

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

type FilterService added in v0.9.0

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

FilterService represents the REST service for Filter client

func NewFilterService added in v0.9.0

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

NewFilterService returns an instance of FilterService

func (*FilterService) Start added in v0.9.0

func (s *FilterService) Start(ctx context.Context)

Start starts the RelayService

func (*FilterService) Stop added in v0.9.0

func (r *FilterService) Stop()

Stop stops the RelayService

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:"pubsubTopic"`
	SenderTime  string `json:"senderTime"`
	StoreTime   string `json:"storeTime"`
	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 LightpushService added in v0.9.0

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

func NewLightpushService added in v0.9.0

func NewLightpushService(node *node.WakuNode, m *chi.Mux, log *zap.Logger) *LightpushService

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 uint, log *zap.Logger) *RelayService

NewRelayService returns an instance of RelayService

type RestConfig added in v0.9.0

type RestConfig struct {
	Address             string
	Port                uint
	EnablePProf         bool
	EnableAdmin         bool
	RelayCacheCapacity  uint
	FilterCacheCapacity uint
}

type RestWakuMessage added in v0.9.0

type RestWakuMessage struct {
	Payload      server.Base64URLByte `json:"payload"`
	ContentTopic string               `json:"contentTopic"`
	Version      *uint32              `json:"version,omitempty"`
	Timestamp    *int64               `json:"timestamp,omitempty"`
	Meta         []byte               `json:"meta,omitempty"`
}

func (*RestWakuMessage) FromProto added in v0.9.0

func (r *RestWakuMessage) FromProto(input *pb.WakuMessage) error

func (*RestWakuMessage) ToProto added in v0.9.0

func (r *RestWakuMessage) ToProto() (*pb.WakuMessage, error)

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:"contentTopic"`
	Version      *uint32 `json:"version,omitempty"`
	Timestamp    *int64  `json:"timestamp,omitempty"`
	Meta         []byte  `json:"meta,omitempty"`
}

type VersionResponse

type VersionResponse string

type WakuPeer added in v0.9.0

type WakuPeer struct {
	ID         string   `json:"id"`
	MultiAddrs []string `json:"multiaddrs"`
	Protocols  []string `json:"protocols"`
	Connected  bool     `json:"connected"`
}

type WakuPeerInfo added in v0.9.0

type WakuPeerInfo struct {
	MultiAddr string   `json:"multiaddr"`
	Shards    []int    `json:"shards"`
	Protocols []string `json:"protocols"`
}

type WakuRest

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

func NewWakuRest

func NewWakuRest(node *node.WakuNode, config RestConfig, 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