transport

package
v0.0.0-...-bd5e2c9 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenAndServe

func ListenAndServe(ctx context.Context, address string, h http.Handler) error

func Serve

func Serve(ctx context.Context, l net.Listener, h http.Handler) error

Serve serves the request

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) (*Handler, error)

func (*Handler) Apply

func (h *Handler) Apply(opts ...Option) error

Apply will apply the options passed.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP calls the serve method on the router

type Option

type Option func(*Handler) error

Option is a Handler modifier.

func Health

func Health() Option

Health endpoints

func Notification

func Notification(service *notification.Service) Option

func Task

func Task(taskService *task.TaskService) Option

Task endpoints

func User

func User(service *user.Service) Option

User endpoints

Jump to

Keyboard shortcuts

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