server

package
v0.0.0-...-4e5f079 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Options)

func Address

func Address(a string) Option

Address to bind to - host:port

func Codec

func Codec(c codec.Codec) Option

func TLSCertFile

func TLSCertFile(c string) Option

func TLSEnable

func TLSEnable(e bool) Option

func TLSKeyFile

func TLSKeyFile(k string) Option

func Transport

func Transport(t transport.Transport) Option

Transport mechanism for communication e.g http, rabbitmq, etc

func Wait

func Wait(b bool) Option

Wait tells the server to wait for requests to finish before exiting

type Options

type Options struct {
	Address     string
	Wait        bool
	TLSEnable   bool
	TLSKeyFile  string
	TLSCertFile string

	Transport transport.Transport
	Codecs    []codec.Codec

	Context context.Context
}

type Server

type Server interface {
	Init(...Option) error
	Options() Options
	Register(invoker.Invoker) error
	Start() error
	Stop() error
	String() string
}

Directories

Path Synopsis
Package rest implement http server
Package rest implement http server

Jump to

Keyboard shortcuts

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