subscription

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// subscription mode enum.
	SubscriptionModeRealtime = "REALTIME"
	SubscriptionModePeriod   = "PERIOD"
	SubscriptionModeChanged  = "ONCHANGED"
	SubscriptionModeUndefine = "UNDEFINE"

	// subscription required fileds.
	SubscriptionFieldMode       = "mode"
	SubscriptionFieldFilter     = "filter"
	SubscriptionFieldTopic      = "topic"
	SubscriptionFieldPubsubName = "pubsub_name"
)

Variables

View Source
var (
	ErrSubscriptionInvalid = errors.New("params invalid")
)

Functions

func NewSubscription

func NewSubscription(
	ctx context.Context,
	in *dao.Entity,
	dispatcher dispatch.Dispatcher,
	rs types.ResourceManager) (stateM state.Machiner, err error)

NewSubscription returns a subscription.

Types

type Base

type Base struct {
	Mode       string `json:"mode" mapstructure:"mode"`
	Filter     string `json:"filter" mapstructure:"filter"`
	Topic      string `json:"topic" mapstructure:"topic"`
	PubsubName string `json:"pubsub_name" mapstructure:"pubsub_name"`
}

Base subscription basic information.

func (*Base) Validate

func (s *Base) Validate() error

checkSubscription returns subscription status.

Jump to

Keyboard shortcuts

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