Skip to content

asecurityteam/component-producer

Repository files navigation

component-producer - Settings component for publishing events to streams

GoDoc

Bugs Code Smells Coverage Duplicated Lines (%) Lines of Code Maintainability Rating Quality Gate Status Reliability Rating Security Rating Technical Debt Vulnerabilities

Overview

This is a settings that enables constructing an event producer. Currently, the only supported client is HTTP, as provided by component-httpclient.

**[Benthos] (https://github.com/Jeffail/benthos) producer is no longer supported as of version 2 of the component. **

We use this, for example, to enable migration to and from servers and serverless deployment models for our event stream producers. When running on servers we run benthos as part of a pod or docker compose and use the HTTP option to send events from our app to the benthos process.

Quick Start

package main

import (
    "context"

    producer "github.com/asecurityteam/component-producer"
    "github.com/asecurityteam/settings"
)

func main() {
    ctx := context.Background()
    envSource := settings.NewEnvSource(os.Environ())

    p := producer.New(ctx, envSource)
    tr := components.NewHTTP(ctx, envSource)
}

Status

This project is in incubation which means we are not yet operating this tool in production and the interfaces are subject to change.

Contributing

Building And Testing

We publish a docker image called SDCLI that bundles all of our build dependencies. It is used by the included Makefile to help make building and testing a bit easier. The following actions are available through the Makefile:

  • make dep

    Install the project dependencies into a vendor directory

  • make lint

    Run our static analysis suite

  • make test

    Run unit tests and generate a coverage artifact

  • make integration

    Run integration tests and generate a coverage artifact

  • make coverage

    Report the combined coverage for unit and integration tests

License

This project is licensed under Apache 2.0. See LICENSE.txt for details.

Contributing Agreement

Atlassian requires signing a contributor's agreement before we can accept a patch. If you are an individual you can fill out the individual CLA. If you are contributing on behalf of your company then please fill out the corporate CLA.

About

component-producer - Settings component for publishing events to streams

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 18