transport

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContext

func NewContext(ctx context.Context, tr Transport) context.Context

Types

type Kind

type Kind string
const (
	KindGRPC Kind = "gRPC"
	KindHTTP Kind = "HTTP"
)

type Server

type Server interface {
	Endpoint() (string, error)
	Start() error
	Stop() error
}

type Transport

type Transport struct {
	Kind Kind
}

func FromContext

func FromContext(ctx context.Context) (tr Transport, ok bool)

FromContext returns the Transport value stored in ctx, if any.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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