gravhttp

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

README

Grav Transport: HTTP

This repo is a simple transport plugin for Grav that uses basic HTTP/S.

Handler functions are made available for Vektor and http.Server, all managed by the GravTransportHTTP object that emits events to a set of HTTP endpoints.

grav-transport-http is in prototype stages, not ready for use

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GravTransportHTTP

type GravTransportHTTP struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

GravTransportHTTP is an HTTP handler manager that pushes messages into a bus

func New

func New() *GravTransportHTTP

New creates a new http transport

func (*GravTransportHTTP) ConnectEndpoint

func (g *GravTransportHTTP) ConnectEndpoint(endpoint string, connect grav.ConnectFunc) error

ConnectEndpoint adds an HTTP/S endpoint to emit messages to

func (*GravTransportHTTP) ConnectEndpointWithUUID

func (g *GravTransportHTTP) ConnectEndpointWithUUID(uuid, endpoint string, connect grav.ConnectFunc) error

ConnectEndpointWithUUID adds an HTTP/S endpoint to emit messages to

func (*GravTransportHTTP) HTTPHandlerFunc

func (g *GravTransportHTTP) HTTPHandlerFunc() http.HandlerFunc

HTTPHandlerFunc returns an http.HandlerFunc for incoming messages

func (*GravTransportHTTP) HandlerFunc

func (g *GravTransportHTTP) HandlerFunc() vk.HandlerFunc

HandlerFunc returns a vk handlerFunc for incoming messages use HTTPHAndlerFunc for a regular Go http.HandlerFunc

func (*GravTransportHTTP) Serve

func (g *GravTransportHTTP) Serve(opts *grav.TransportOpts, connect grav.ConnectFunc) error

Serve creates a request server to handle incoming messages (not yet implemented)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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