Documentation
¶
Index ¶
- func DeliverActivityToFollowers(ctx context.Context, opts *DeliverActivityToFollowersOptions) error
- func DeliveryQueueSchemes() []string
- func ProcessFollowerQueueSchemes() []string
- func ProcessMessageQueueSchemes() []string
- func RegisterDeliveryQueue(ctx context.Context, scheme string, init_func DeliveryQueueInitializationFunc) error
- func RegisterProcessFollowerQueue(ctx context.Context, scheme string, ...) error
- func RegisterProcessMessageQueue(ctx context.Context, scheme string, ...) error
- func RegisterPubSubDeliverySchemes(ctx context.Context) error
- func RegisterPubSubProcessFollowerSchemes(ctx context.Context) error
- func RegisterPubSubProcessMessageSchemes(ctx context.Context) error
- type DeliverActivityToFollowersOptions
- type DeliveryQueue
- func NewDeliveryQueue(ctx context.Context, uri string) (DeliveryQueue, error)
- func NewNullDeliveryQueue(ctx context.Context, uri string) (DeliveryQueue, error)
- func NewPubSubDeliveryQueue(ctx context.Context, uri string) (DeliveryQueue, error)
- func NewSlogDeliveryQueue(ctx context.Context, uri string) (DeliveryQueue, error)
- func NewSynchronousDeliveryQueue(ctx context.Context, uri string) (DeliveryQueue, error)
- type DeliveryQueueInitializationFunc
- type NullDeliveryQueue
- type NullProcessFollowerQueue
- type NullProcessMessageQueue
- type ProcessFollowerQueue
- func NewNullProcessFollowerQueue(ctx context.Context, uri string) (ProcessFollowerQueue, error)
- func NewProcessFollowerQueue(ctx context.Context, uri string) (ProcessFollowerQueue, error)
- func NewPubSubProcessFollowerQueue(ctx context.Context, uri string) (ProcessFollowerQueue, error)
- func NewSlogProcessFollowerQueue(ctx context.Context, uri string) (ProcessFollowerQueue, error)
- type ProcessFollowerQueueInitializationFunc
- type ProcessMessageQueue
- func NewNullProcessMessageQueue(ctx context.Context, uri string) (ProcessMessageQueue, error)
- func NewProcessMessageQueue(ctx context.Context, uri string) (ProcessMessageQueue, error)
- func NewPubSubProcessMessageQueue(ctx context.Context, uri string) (ProcessMessageQueue, error)
- func NewSlogProcessMessageQueue(ctx context.Context, uri string) (ProcessMessageQueue, error)
- type ProcessMessageQueueInitializationFunc
- type PubSubDeliveryQueue
- type PubSubDeliveryQueueOptions
- type PubSubProcessFollowerQueue
- type PubSubProcessMessageQueue
- type SlogDeliveryQueue
- type SlogProcessFollowerQueue
- type SlogProcessMessageQueue
- type SynchronousDeliveryQueue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeliverActivityToFollowers ¶
func DeliverActivityToFollowers(ctx context.Context, opts *DeliverActivityToFollowersOptions) error
func DeliveryQueueSchemes ¶
func DeliveryQueueSchemes() []string
Schemes returns the list of schemes that have been registered.
func ProcessFollowerQueueSchemes ¶ added in v0.0.3
func ProcessFollowerQueueSchemes() []string
Schemes returns the list of schemes that have been registered.
func ProcessMessageQueueSchemes ¶
func ProcessMessageQueueSchemes() []string
Schemes returns the list of schemes that have been registered.
func RegisterDeliveryQueue ¶
func RegisterDeliveryQueue(ctx context.Context, scheme string, init_func DeliveryQueueInitializationFunc) error
RegisterDeliveryQueue registers 'scheme' as a key pointing to 'init_func' in an internal lookup table used to create new `DeliveryQueue` instances by the `NewDeliveryQueue` method.
func RegisterProcessFollowerQueue ¶ added in v0.0.3
func RegisterProcessFollowerQueue(ctx context.Context, scheme string, init_func ProcessFollowerQueueInitializationFunc) error
RegisterProcessFollowerQueue registers 'scheme' as a key pointing to 'init_func' in an internal lookup table used to create new `ProcessFollowerQueue` instances by the `NewProcessFollowerQueue` method.
func RegisterProcessMessageQueue ¶
func RegisterProcessMessageQueue(ctx context.Context, scheme string, init_func ProcessMessageQueueInitializationFunc) error
RegisterProcessMessageQueue registers 'scheme' as a key pointing to 'init_func' in an internal lookup table used to create new `ProcessMessageQueue` instances by the `NewProcessMessageQueue` method.
func RegisterPubSubProcessFollowerSchemes ¶ added in v0.0.3
Types ¶
type DeliverActivityToFollowersOptions ¶
type DeliverActivityToFollowersOptions struct {
AccountsDatabase database.AccountsDatabase
FollowersDatabase database.FollowersDatabase
NotesDatabase database.NotesDatabase
DeliveriesDatabase database.DeliveriesDatabase
DeliveryQueue DeliveryQueue
Activity *activitypub.Activity
Mentions []*activitypub.PostTag `json:"mentions"`
MaxAttempts int `json:"max_attempts"`
URIs *uris.URIs
}
type DeliveryQueue ¶
type DeliveryQueue interface {
DeliverActivity(context.Context, *deliver.DeliverActivityOptions) error
Close(context.Context) error
}
func NewDeliveryQueue ¶
func NewDeliveryQueue(ctx context.Context, uri string) (DeliveryQueue, error)
NewDeliveryQueue returns a new `DeliveryQueue` instance configured by 'uri'. The value of 'uri' is parsed as a `url.URL` and its scheme is used as the key for a corresponding `DeliveryQueueInitializationFunc` function used to instantiate the new `DeliveryQueue`. It is assumed that the scheme (and initialization function) have been registered by the `RegisterDeliveryQueue` method.
func NewNullDeliveryQueue ¶
func NewNullDeliveryQueue(ctx context.Context, uri string) (DeliveryQueue, error)
func NewPubSubDeliveryQueue ¶
func NewPubSubDeliveryQueue(ctx context.Context, uri string) (DeliveryQueue, error)
func NewSlogDeliveryQueue ¶
func NewSlogDeliveryQueue(ctx context.Context, uri string) (DeliveryQueue, error)
func NewSynchronousDeliveryQueue ¶
func NewSynchronousDeliveryQueue(ctx context.Context, uri string) (DeliveryQueue, error)
type DeliveryQueueInitializationFunc ¶
type DeliveryQueueInitializationFunc func(ctx context.Context, uri string) (DeliveryQueue, error)
DeliveryQueueInitializationFunc is a function defined by individual delivery_queue package and used to create an instance of that delivery_queue
type NullDeliveryQueue ¶
type NullDeliveryQueue struct {
DeliveryQueue
}
func (*NullDeliveryQueue) DeliverActivity ¶
func (q *NullDeliveryQueue) DeliverActivity(ctx context.Context, opts *deliver.DeliverActivityOptions) error
type NullProcessFollowerQueue ¶ added in v0.0.3
type NullProcessFollowerQueue struct {
ProcessFollowerQueue
}
func (*NullProcessFollowerQueue) Close ¶ added in v0.0.3
func (q *NullProcessFollowerQueue) Close(ctx context.Context) error
func (*NullProcessFollowerQueue) ProcessFollower ¶ added in v0.0.3
func (q *NullProcessFollowerQueue) ProcessFollower(ctx context.Context, follower_id int64) error
type NullProcessMessageQueue ¶
type NullProcessMessageQueue struct {
ProcessMessageQueue
}
func (*NullProcessMessageQueue) Close ¶
func (q *NullProcessMessageQueue) Close(ctx context.Context) error
func (*NullProcessMessageQueue) ProcessMessage ¶
func (q *NullProcessMessageQueue) ProcessMessage(ctx context.Context, message_id int64) error
type ProcessFollowerQueue ¶ added in v0.0.3
type ProcessFollowerQueue interface {
ProcessFollower(context.Context, int64) error
Close(context.Context) error
}
func NewNullProcessFollowerQueue ¶ added in v0.0.3
func NewNullProcessFollowerQueue(ctx context.Context, uri string) (ProcessFollowerQueue, error)
func NewProcessFollowerQueue ¶ added in v0.0.3
func NewProcessFollowerQueue(ctx context.Context, uri string) (ProcessFollowerQueue, error)
NewProcessFollowerQueue returns a new `ProcessFollowerQueue` instance configured by 'uri'. The value of 'uri' is parsed as a `url.URL` and its scheme is used as the key for a corresponding `ProcessFollowerQueueInitializationFunc` function used to instantiate the new `ProcessFollowerQueue`. It is assumed that the scheme (and initialization function) have been registered by the `RegisterProcessFollowerQueue` method.
func NewPubSubProcessFollowerQueue ¶ added in v0.0.3
func NewPubSubProcessFollowerQueue(ctx context.Context, uri string) (ProcessFollowerQueue, error)
func NewSlogProcessFollowerQueue ¶ added in v0.0.3
func NewSlogProcessFollowerQueue(ctx context.Context, uri string) (ProcessFollowerQueue, error)
type ProcessFollowerQueueInitializationFunc ¶ added in v0.0.3
type ProcessFollowerQueueInitializationFunc func(ctx context.Context, uri string) (ProcessFollowerQueue, error)
ProcessFollowerQueueInitializationFunc is a function defined by individual process_follow_queue package and used to create an instance of that process_follow_queue
type ProcessMessageQueue ¶
type ProcessMessageQueue interface {
ProcessMessage(context.Context, int64) error
Close(context.Context) error
}
func NewNullProcessMessageQueue ¶
func NewNullProcessMessageQueue(ctx context.Context, uri string) (ProcessMessageQueue, error)
func NewProcessMessageQueue ¶
func NewProcessMessageQueue(ctx context.Context, uri string) (ProcessMessageQueue, error)
NewProcessMessageQueue returns a new `ProcessMessageQueue` instance configured by 'uri'. The value of 'uri' is parsed as a `url.URL` and its scheme is used as the key for a corresponding `ProcessMessageQueueInitializationFunc` function used to instantiate the new `ProcessMessageQueue`. It is assumed that the scheme (and initialization function) have been registered by the `RegisterProcessMessageQueue` method.
func NewPubSubProcessMessageQueue ¶
func NewPubSubProcessMessageQueue(ctx context.Context, uri string) (ProcessMessageQueue, error)
func NewSlogProcessMessageQueue ¶
func NewSlogProcessMessageQueue(ctx context.Context, uri string) (ProcessMessageQueue, error)
type ProcessMessageQueueInitializationFunc ¶
type ProcessMessageQueueInitializationFunc func(ctx context.Context, uri string) (ProcessMessageQueue, error)
ProcessMessageQueueInitializationFunc is a function defined by individual process_message_queue package and used to create an instance of that process_message_queue
type PubSubDeliveryQueue ¶
type PubSubDeliveryQueue struct {
DeliveryQueue
// contains filtered or unexported fields
}
func (*PubSubDeliveryQueue) DeliverActivity ¶
func (q *PubSubDeliveryQueue) DeliverActivity(ctx context.Context, opts *deliver.DeliverActivityOptions) error
type PubSubDeliveryQueueOptions ¶
type PubSubDeliveryQueueOptions struct {
// The unique ID associated with the pubsub delivery. This is mostly for debugging between the sender and the receiver.
Id int64 `json:"id"`
// The actor to whom the activity should be delivered.
To string `json:"to"`
// The unique Activity(Database) Id associated with the delivery.
ActivityId int64 `json:"activity_id"`
}
type PubSubProcessFollowerQueue ¶ added in v0.0.3
type PubSubProcessFollowerQueue struct {
ProcessFollowerQueue
// contains filtered or unexported fields
}
func (*PubSubProcessFollowerQueue) Close ¶ added in v0.0.3
func (q *PubSubProcessFollowerQueue) Close(ctx context.Context) error
func (*PubSubProcessFollowerQueue) ProcessFollower ¶ added in v0.0.3
func (q *PubSubProcessFollowerQueue) ProcessFollower(ctx context.Context, follower_id int64) error
type PubSubProcessMessageQueue ¶
type PubSubProcessMessageQueue struct {
ProcessMessageQueue
// contains filtered or unexported fields
}
func (*PubSubProcessMessageQueue) Close ¶
func (q *PubSubProcessMessageQueue) Close(ctx context.Context) error
func (*PubSubProcessMessageQueue) ProcessMessage ¶
func (q *PubSubProcessMessageQueue) ProcessMessage(ctx context.Context, message_id int64) error
type SlogDeliveryQueue ¶
type SlogDeliveryQueue struct {
DeliveryQueue
}
func (*SlogDeliveryQueue) DeliverActivity ¶
func (q *SlogDeliveryQueue) DeliverActivity(ctx context.Context, opts *deliver.DeliverActivityOptions) error
type SlogProcessFollowerQueue ¶ added in v0.0.3
type SlogProcessFollowerQueue struct {
ProcessFollowerQueue
}
func (*SlogProcessFollowerQueue) Close ¶ added in v0.0.3
func (q *SlogProcessFollowerQueue) Close(ctx context.Context) error
func (*SlogProcessFollowerQueue) ProcessFollower ¶ added in v0.0.3
func (q *SlogProcessFollowerQueue) ProcessFollower(ctx context.Context, follower_id int64) error
type SlogProcessMessageQueue ¶
type SlogProcessMessageQueue struct {
ProcessMessageQueue
}
func (*SlogProcessMessageQueue) Close ¶
func (q *SlogProcessMessageQueue) Close(ctx context.Context) error
func (*SlogProcessMessageQueue) ProcessMessage ¶
func (q *SlogProcessMessageQueue) ProcessMessage(ctx context.Context, message_id int64) error
type SynchronousDeliveryQueue ¶
type SynchronousDeliveryQueue struct {
DeliveryQueue
}
func (*SynchronousDeliveryQueue) Close ¶
func (q *SynchronousDeliveryQueue) Close(ctx context.Context) error
func (*SynchronousDeliveryQueue) DeliverActivity ¶
func (q *SynchronousDeliveryQueue) DeliverActivity(ctx context.Context, opts *deliver.DeliverActivityOptions) error
Source Files
¶
- deliver_activity.go
- delivery_queue.go
- delivery_queue_null.go
- delivery_queue_pubsub.go
- delivery_queue_slog.go
- delivery_queue_synchronous.go
- process_follower_null.go
- process_follower_pubsub.go
- process_follower_queue.go
- process_follower_slog.go
- process_message_queue.go
- process_message_queue_null.go
- process_message_queue_pubsub.go
- process_message_queue_slog.go