http

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

README

Kubemq HTTP Source

Kubemq HTTP source provides a REST Api endpoints for processing source REST Api request.

Prerequisites

The following are required to run events source connector:

  • kubemq cluster
  • kubemq-sources deployment

Configuration

HTTP source connector configuration properties:

Properties Key Required Description Example
methods yes List for REST API methods to process "GET,POST,PUT,PATCH,DELETE"
path yes set http server endpoint path "/path"

Example:

bindings:
  - name: http-post-kubemq-event
    source:
      kind: http
      name: http-post
      properties:
        "methods": "post"
        "path": "/post"
    target:
      kind: kubemq.events
      name: target-kubemq-events
      properties:
        address: "kubemq-cluster:50000"
        client_id: "kubemq-http-connector"
        auth_token: ""
        channel: "events.post"
    properties:
      log_level: "info"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connector added in v0.2.1

func Connector() *common.Connector

Types

type Client added in v0.7.0

type Client struct {
	Methods []string
	Path    string
	// contains filtered or unexported fields
}

func New

func New() *Client

func (*Client) Connector added in v0.7.0

func (c *Client) Connector() *common.Connector

func (*Client) Init added in v0.7.0

func (c *Client) Init(ctx context.Context, cfg config.Spec, log *logger.Logger) error

func (*Client) ServeHTTP added in v0.7.0

func (c *Client) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Client) Start added in v0.7.0

func (c *Client) Start(ctx context.Context, target targetMiddleware.Middleware) error

func (*Client) Stop added in v0.7.0

func (c *Client) Stop() error

Jump to

Keyboard shortcuts

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