Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // ServiceName is the name of the service (used for logging). ServiceName string // ServiceIRI is the IRI of the local service (actor). It is used as the 'actor' in activities // that are posted to the outbox by the handler. ServiceIRI *url.URL // BufferSize is the size of the Go channel buffer for a subscription. BufferSize int // MaxWitnessDelay is the maximum delay from when the witness receives the transaction (via an Offer) for // the witness to include the transaction into the ledger. MaxWitnessDelay time.Duration }
Config holds the configuration parameters for the activity handler.
type Inbox ¶
Inbox handles activities posted to the inbox.
func NewInbox ¶
func NewInbox(cfg *Config, s store.Store, outbox service.Outbox, t httpTransport, opts ...service.HandlerOpt) *Inbox
NewInbox returns a new ActivityPub inbox activity handler.
func (*Inbox) HandleActivity ¶
func (h *Inbox) HandleActivity(activity *vocab.ActivityType) error
HandleActivity handles the ActivityPub activity in the inbox.
func (Inbox) Subscribe ¶
func (h Inbox) Subscribe() <-chan *vocab.ActivityType
Subscribe allows a client to receive published activities.
type Outbox ¶
type Outbox struct {
// contains filtered or unexported fields
}
Outbox handles activities posted to the outbox.
func (*Outbox) HandleActivity ¶
func (h *Outbox) HandleActivity(activity *vocab.ActivityType) error
HandleActivity handles the ActivityPub activity in the outbox.
func (Outbox) Subscribe ¶
func (h Outbox) Subscribe() <-chan *vocab.ActivityType
Subscribe allows a client to receive published activities.
Click to show internal directories.
Click to hide internal directories.