api

package
v0.0.0-...-21a6d54 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OpenSergoClient

type OpenSergoClient interface {
	// Start the client.
	Start() error
	// SubscribeConfig subscribes data for given subscribe target.
	SubscribeConfig(key model.SubscribeKey, opts ...SubscribeOption) error
	// UnsubscribeConfig unsubscribes data for given subscribe target.
	UnsubscribeConfig(subscribeKey model.SubscribeKey) error
}

OpenSergoClient is the universal interface of OpenSergo client.

type SubscribeOption

type SubscribeOption func(*SubscribeOptions)

func WithAttachment

func WithAttachment(key string, value interface{}) SubscribeOption

WithAttachment provides an attachment (key-value pair).

func WithSubscriber

func WithSubscriber(subscriber subscribe.Subscriber) SubscribeOption

WithSubscriber provides a subscriber.

type SubscribeOptions

type SubscribeOptions struct {
	Subscribers []subscribe.Subscriber
	Attachments map[string]interface{}
}

SubscribeOptions represents the options of OpenSergo data subscription.

Jump to

Keyboard shortcuts

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