publish

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KindServerService = "serverService"
)
View Source
const (
	KindStdout = "stdout"
)

Variables

View Source
var (
	ErrSlugs                   = errors.New("slugs error")
	ErrServerServiceQuery      = errors.New("error in server service query")
	ErrRegisterChanges         = errors.New("error in server service register changes")
	ErrAssetObjectConversion   = errors.New("error converting asset object")
	ErrChangeList              = errors.New("error building change list")
	ErrServerServiceAttrObject = errors.New("error in server service attribute object")
)
View Source
var (
	ErrCredentials = errors.New("errors in credentials")
)

Functions

This section is empty.

Types

type Publisher

type Publisher interface {
	// RunInventoryPublisher spawns a device inventory publisher that iterates over the device objects received
	// on the collector channel and publishes them to the configured publish target.
	RunInventoryPublisher(ctx context.Context) error

	// PublishOne publishes the given device information to the configured publish target
	PublishOne(ctx context.Context, device *model.Asset) error
}

Publisher defines an interface for device inventory to be published to remote endpoints.

func NewServerServicePublisher

func NewServerServicePublisher(ctx context.Context, alloy *app.App) (Publisher, error)

NewServerServicePublisher returns a serverService publisher to submit inventory data.

func NewStdoutPublisher

func NewStdoutPublisher(_ context.Context, alloy *app.App) (Publisher, error)

NewStdoutPublisher returns a new publisher that prints received objects to stdout.

Jump to

Keyboard shortcuts

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