msgs

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifications

type Notifications struct {

	// ResourceLocation is the location of the resources in this notification. This is the normalized ARM location enum
	// like "eastus".
	ResourceLocation string
	// FrontdoorLocation is the ARM region that emitted the notification. Omitted for notifications not emitted by ARM.
	FrontdoorLocation string
	// PublisherInfo is the Namespace of the publisher sending the data of this notification, for example Microsoft.Resources is be the publisherInfo for ARM.
	PublisherInfo string
	// AdditionalBatchProperties can contain the sdkversion, batchsize, subscription partition tag etc.
	AdditionalBatchProperties types.AdditionalBatchProperties

	// Data is the data to send in the notification.
	Data []types.NotificationResource
	// contains filtered or unexported fields
}

Notifications is a notification to send to the ARN service. This is a wrapper around the actual data that is sent in the notification described in types.Data. The data will be converted to an Event and sent over the wire.

func (Notifications) Ctx

func (n Notifications) Ctx() context.Context

func (Notifications) DataCount

func (n Notifications) DataCount() int

DataCount implements models.Notifications.DataCount().

func (Notifications) GetPublisherInfo added in v0.1.2

func (n Notifications) GetPublisherInfo() string

GetPublisherInfo implements models.Notifications.GetPublisherInfo().

func (Notifications) Promise

func (n Notifications) Promise(ctx context.Context) error

Promise waits for the promise to be fulfilled. This will return an ErrPromiseTimeout if the context passed times out to distiguish it from a context timeout on sending the notification.

func (Notifications) Recycle

func (n Notifications) Recycle()

Recycle can be used to recycle the promise of a notification once it has been used. This is for internal use and should not be called. It is a terrible idea to use the promise after it has been recycled.

func (Notifications) SendEvent

func (n Notifications) SendEvent(hc *http.Client, store *storage.Client) (err error)

SendEvent converts the notification to an event and sends it to the ARN service. Do not call this function directly, use methods on the Client instead.

func (Notifications) SendPromise

func (n Notifications) SendPromise(e error, backupCh chan error)

SendPromise sends an error on the promise to the notification.

func (Notifications) SetCtx

SetCtx implements models.Notifications.SetCtx().

func (Notifications) SetPromise

func (n Notifications) SetPromise(promise chan error) models.Notifications

SetPromise sets the promise channel used for the notification.

func (Notifications) Version

func (n Notifications) Version() version.Schema

DataJSON implements models.Notifications.Version().

Jump to

Keyboard shortcuts

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