Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidFormat = errors.New("invalid format")
Functions ¶
func FulltextMatch ¶
FulltextMatch is the default matching function used for checking if a peer supports a protocol or not
func GenerateRequestId ¶
func GenerateRequestId() []byte
GenerateRequestId generates a random 32 byte slice that can be used for creating requests inf the filter, store and lightpush protocols
Types ¶
type ContentTopic ¶
type ContentTopic struct { ApplicationName string ApplicationVersion uint ContentTopicName string Encoding string }
func NewContentTopic ¶
func NewContentTopic(applicationName string, applicationVersion uint, contentTopicName string, encoding string) ContentTopic
func StringToContentTopic ¶
func StringToContentTopic(s string) (ContentTopic, error)
func (ContentTopic) Equal ¶
func (ct ContentTopic) Equal(ct2 ContentTopic) bool
func (ContentTopic) String ¶
func (ct ContentTopic) String() string
type Envelope ¶
type Envelope struct {
// contains filtered or unexported fields
}
Envelope contains information about the pubsub topic of a WakuMessage and a hash used to identify a message based on the bytes of a WakuMessage protobuffer
func NewEnvelope ¶
func NewEnvelope(msg *wpb.WakuMessage, receiverTime int64, pubSubTopic string) *Envelope
NewEnvelope creates a new Envelope that contains a WakuMessage It's used as a way to know to which Pubsub topic belongs a WakuMessage as well as generating a hash based on the bytes that compose the message
func (*Envelope) Message ¶
func (e *Envelope) Message() *wpb.WakuMessage
Message returns the WakuMessage associated to an Envelope
func (*Envelope) PubsubTopic ¶
PubsubTopic returns the topic on which a WakuMessage was received
type PubsubTopic ¶
func DefaultPubsubTopic ¶
func DefaultPubsubTopic() PubsubTopic
func NewPubsubTopic ¶
func NewPubsubTopic(name string, encoding string) PubsubTopic
func StringToPubsubTopic ¶
func StringToPubsubTopic(s string) (PubsubTopic, error)
func (PubsubTopic) Equal ¶
func (t PubsubTopic) Equal(t2 PubsubTopic) bool
func (PubsubTopic) String ¶
func (t PubsubTopic) String() string