convoy

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MPL-2.0 Imports: 3 Imported by: 22

README

convoy image

golangci-lint Build and run all tests

Convoy is an open source high-performance webhooks gateway used to securely ingest, persist, debug, deliver and manage millions of events reliably with rich features such as retries, rate limiting, static ips, circuit breaking, rolling secrets and more. To get started import the openapi spec into Postman or Insomnia.

Convoy provides several key features:

  • Webhooks Gateway: As a webhooks gateway, Convoy lives at the edge of your network to stream webhooks from your microservices, and send them out to your users as well as receive webhooks from your providers and route them to the required services. With this your internal systems are never exposed to the public internet.

  • Scalability: Convoy acts as a dedicated message queue for webhooks, and was designed to be horizontally scalable. It includes several components like the api server, workers, scheduler, and socket server which can be scaled independently to fit the need.

  • Security: Convoy ships with several security features for webhooks, such as payload signing to ensure message integrity, bearer token authentication for authenticated webhook endpoints, and static ips for network environments with strict firewall rules.

  • Fan Out: Convoy is able to route an event to multiple endpoints based on the event type or payload structure.

  • Rate Limiting: While Convoy is able to ingest events at a massive rate, it throttles the delivery of these events to the endpoints at a configurable rate per endpoint.

  • Retries & Batch Retries: Convoy supports two retry algorithms; constant time and exponential backoff with jitter. Where automatic retries are not sufficient, convoy provides batch retries for endpoints are consecutively failed to process retried events.

  • Customer-Facing Dashboards: Convoy allows you to generate customer facing webhooks dashboard to embed into your applications using an iframe. On this dashboard, users can debug webhooks, retry events, add endpoints, and configure each endpoint's subscription.

  • Endpoint Failure Notifications: When endpoints consecutively fails to process events, convoy disables the endpoint and sends out a notification. Two types of notifications are supported: Email and Slack Notifications.

Installation, Getting Started

To do this make sure you have Docker 20+ installed.

# Get the code
$ git clone https://github.com/frain-dev/convoy.git

# Go to the Convoy folder
$ cd convoy

# Start Services
$ docker compose -f configs/local/docker-compose.yml up

Convoy Cloud

Get started with our free Convoy Cloud version, request access: sales@getconvoy.io

Contributing

Thank you for your interest in contributing! Please refer to CONTRIBUTING.md for guidance. For contributions to the Convoy dashboard, please refer to the web/ui directory.

License

Mozilla Public License v2.0

Documentation

Index

Constants

View Source
const (
	RATE_LIMIT          = 5000
	RATE_LIMIT_DURATION = "1m"
	HTTP_TIMEOUT        = "30s"
)
View Source
const (
	EventProcessor              TaskName = "EventProcessor"
	DeadLetterProcessor         TaskName = "DeadLetterProcessor"
	CreateEventProcessor        TaskName = "CreateEventProcessor"
	CreateDynamicEventProcessor TaskName = "CreateDynamicEventProcessor"
	MetaEventProcessor          TaskName = "MetaEventProcessor"
	NotificationProcessor       TaskName = "NotificationProcessor"
	// todo(raymond): remove this and it's references
	IndexDocument                TaskName = "index document"
	TokenizeSearch               TaskName = "tokenize search"
	TokenizeSearchForProject     TaskName = "tokenize search for project"
	DailyAnalytics               TaskName = "daily analytics"
	StreamCliEventsProcessor     TaskName = "StreamCliEventsProcessor"
	MonitorTwitterSources        TaskName = "monitor twitter sources"
	RetentionPolicies            TaskName = "retention_policies"
	EmailProcessor               TaskName = "EmailProcessor"
	ExpireSecretsProcessor       TaskName = "ExpireSecretsProcessor"
	DeleteArchivedTasksProcessor TaskName = "DeleteArchivedTasksProcessor"

	EndpointsCacheKey          CacheKey = "endpoints"
	OrganisationsCacheKey      CacheKey = "organisations"
	OrganisationMemberCacheKey CacheKey = "organisation_members"
	ProjectsCacheKey           CacheKey = "projects"
	TokenCacheKey              CacheKey = "tokens"
	SourceCacheKey             CacheKey = "sources"
	IdempotencyCacheKey        CacheKey = "dedup"
)
View Source
const (
	DefaultOnPremDir = "/var/convoy/export"
	TmpExportDir     = "/tmp/convoy/export"
)

Exports dir

View Source
const (
	Concurrency = 100
)
View Source
const (
	EventDeliveryIDLength = 12
)

Variables

View Source
var MigrationFiles embed.FS

Functions

func GetVersion added in v0.4.10

func GetVersion() string

TODO(subomi): This needs to be refactored for everywhere we depend on this code.

func GetVersionFromFS added in v0.9.2

func GetVersionFromFS(fs embed.FS) string

Types

type CacheKey added in v0.5.3

type CacheKey string

func (CacheKey) Get added in v0.5.3

func (c CacheKey) Get(suffix string) CacheKey

func (CacheKey) String added in v0.5.3

func (c CacheKey) String() string

type HttpMethod

type HttpMethod string
const (
	HttpPost HttpMethod = "POST"
	HttpGet  HttpMethod = "GET"
)

type Plugin

type Plugin interface {
	Apply(http.ResponseWriter, *http.Request) error
	Name() string
	IsEnabled() bool
}

type QueueName added in v0.6.0

type QueueName string
const (
	EventQueue       QueueName = "EventQueue"
	CreateEventQueue QueueName = "CreateEventQueue"
	MetaEventQueue   QueueName = "MetaEventQueue"
	SearchIndexQueue QueueName = "SearchIndexQueue"
	StreamQueue      QueueName = "StreamQueue"
	ScheduleQueue    QueueName = "ScheduleQueue"
	DefaultQueue     QueueName = "DefaultQueue"
)

queues

type TaskName

type TaskName string

func (TaskName) SetPrefix

func (t TaskName) SetPrefix(prefix string) TaskName

Directories

Path Synopsis
api
cmd
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag at 2023-07-27 11:10:15.044479 +0100 BST m=+1.062988834
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag at 2023-07-27 11:10:15.044479 +0100 BST m=+1.062988834
ee
api
cmd
internal
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
pkg
log
url

Jump to

Keyboard shortcuts

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