setting

package
v0.4.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddSubscriber

func AddSubscriber(n string, h func(context.Context, BusMessage) error) error

AddSubscriber add the subscriber to handle the changed notification from model.Setting.

func Notify

func Notify(ctx context.Context, mc model.ClientSet, refers model.Settings) error

Notify notifies the changed model.Setting.

Types

type BusMessage

type BusMessage struct {
	// TransactionalModelClient holds the model.ClientSet of this calling session,
	// it should be a transactional DAO client,
	// please don't keep for long-term using.
	TransactionalModelClient model.ClientSet
	// Refers holds the updating model.Setting list of this calling session.
	Refers model.Settings
}

BusMessage wraps the changed model.Setting as a bus.Message.

Jump to

Keyboard shortcuts

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