manager

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 8, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CallbackSetEvent = iota
	CallbackDeleteEvent
)

event

Variables

This section is empty.

Functions

This section is empty.

Types

type CallbackPlan

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

CallbackPlan If the callback plan execute SUCCESS, the plan will be uninstalled

type CallbackPlanOption

type CallbackPlanOption struct {
	CallbackPath string
	Events       []int
	RetryTimes   int
	IsPersistent bool
	Method       string
	ExpectValue  interface{}
}

type SubscribeCenter

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

func GetSubscribeCenter

func GetSubscribeCenter() *SubscribeCenter

func NewSubscribeCenter

func NewSubscribeCenter(option *SubscribeCenterOption) *SubscribeCenter

func (*SubscribeCenter) Close

func (s *SubscribeCenter) Close()

func (*SubscribeCenter) DefaultCallbackMethod added in v0.0.8

func (s *SubscribeCenter) DefaultCallbackMethod() string

func (*SubscribeCenter) GetFlag added in v0.0.7

func (s *SubscribeCenter) GetFlag() storage.Flag

func (*SubscribeCenter) Notify

func (s *SubscribeCenter) Notify(key string, newVal interface{}, event int)

Notify just callback

func (*SubscribeCenter) Subscribe

func (s *SubscribeCenter) Subscribe(option *SubscribeManifest)

func (*SubscribeCenter) View added in v0.0.7

func (s *SubscribeCenter) View() []byte

type SubscribeCenterOption

type SubscribeCenterOption struct {
	DefaultCallbackMethod string `yaml:"DefaultCallbackMethod"`
	RetryQueueLen         uint   `yaml:"RetryQueueLen"`
	RetryTickInterval     uint   `yaml:"RetryTickInterval"`
}

func DefaultSubscribeCenterOption

func DefaultSubscribeCenterOption() *SubscribeCenterOption

type SubscribeManifest

type SubscribeManifest struct {
	Key          string      `json:"k"`
	CallbackPath string      `json:"cp"`
	ExpectEvent  []int       `json:"ee"`
	RetryTimes   int         `json:"rt"`
	IsPersistent bool        `json:"ip"`
	Method       string      `json:"m"`
	ExpectValue  interface{} `json:"ev"`
}

Jump to

Keyboard shortcuts

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