server

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClientContext

func NewClientContext(ctx context.Context, srv Server) context.Context

func NewServerContext

func NewServerContext(ctx context.Context, srv Server) context.Context

Types

type Server

type Server interface {
	Start(context.Context) error
	Stop(context.Context) error

	// Endpoint return server or client endpoint
	// Server Transport: grpc://127.0.0.1:9000
	Endpoint() (*url.URL, error)
}

Server ...

func FromClientContext

func FromClientContext(ctx context.Context) (srv Server, ok bool)

func FromServerContext

func FromServerContext(ctx context.Context) (srv Server, ok bool)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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