xports

package
v0.0.13 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GRPCServer

type GRPCServer struct {
	*grpc.Server
	Listener net.Listener
}

GRPCServer is a wrapper over grpc.Server that implements xservice.RunnerCloser interface.

func NewGRPCServer

func NewGRPCServer(addr string, options ...grpc.ServerOption) (*GRPCServer, error)

NewGRPCServer creates a new port for the GRPC server.

func (*GRPCServer) Close

func (g *GRPCServer) Close(_ context.Context) error

Close stops the GRPC server.

func (*GRPCServer) Run

func (g *GRPCServer) Run() error

Run starts the GRPC server.

type HttpServer

type HttpServer struct {
	Server *http.Server
}

HttpServer is a wrapper over http.Server that implements xservice.RunnerCloser interface.

func NewHTTPServer

func NewHTTPServer(mux http.Handler, addr string) *HttpServer

NewHTTPServer creates a new http server port for the images.

func (*HttpServer) Close

func (h *HttpServer) Close(_ context.Context) error

Close stops the http server.

func (*HttpServer) Run

func (h *HttpServer) Run() error

Run starts running the server in it's own go routine.

Jump to

Keyboard shortcuts

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