outbox

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ServiceName           string
	ServiceIRI            *url.URL
	Topic                 string
	RedeliveryConfig      *redelivery.Config
	MaxRecipients         int
	MaxConcurrentRequests int
}

Config holds configuration parameters for the outbox.

type Outbox

type Outbox struct {
	*Config
	*lifecycle.Lifecycle
	// contains filtered or unexported fields
}

Outbox implements the ActivityPub outbox.

func New

func New(cfg *Config, s store.Store, pubSub pubSub, t httpTransport, activityHandler service.ActivityHandler,
	apClient activityPubClient, resourceResolver resourceResolver, handlerOpts ...service.HandlerOpt) (*Outbox, error)

New returns a new ActivityPub Outbox.

func (*Outbox) Post

func (h *Outbox) Post(activity *vocab.ActivityType) (*url.URL, error)

Post posts an activity to the outbox and returns the ID of the activity that was posted. If the activity does not specify an ID then a unique ID will be generated. The 'actor' of the activity is also assigned to the service IRI of the outbox.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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