pubsub

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: MIT Imports: 5 Imported by: 1

README

pubsub

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetLoggerInstance

func SetLoggerInstance(logger ILogger) bool

Types

type ILogger

type ILogger interface {
	All(v ...interface{})
	AllF(format string, v ...interface{})
	Debug(v ...interface{})
	DebugF(format string, v ...interface{})
	Info(v ...interface{})
	InfoF(format string, v ...interface{})
	Warning(v ...interface{})
	WarningF(format string, v ...interface{})
	Error(v ...interface{})
	ErrorF(format string, v ...interface{})
}

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