pubsub

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ObServer

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

func NewObServer

func NewObServer(enableSafeMode bool, subArgs ...SubArg) (*ObServer, error)

func (*ObServer) Publish

func (t *ObServer) Publish(topic interface{}, enableCo bool, args ...interface{}) (retErr error)

func (*ObServer) Subscribe

func (t *ObServer) Subscribe(topic interface{}, subKey interface{}, topicFunc TopicFunc, preArgs ...interface{}) (retErr error)

func (*ObServer) Unsubscribe

func (t *ObServer) Unsubscribe(topic interface{}, subKey interface{}) (retErr error)

type SubArg

type SubArg struct {
	Topic     interface{}
	SubKey    interface{}
	TopicFunc TopicFunc
	PreArgs   []interface{}
}

type Subject

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

type TopicFunc

type TopicFunc func(args ...interface{})

Jump to

Keyboard shortcuts

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