app

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2023 License: Apache-2.0 Imports: 7 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(o *Options)

func WithBasePath

func WithBasePath(path string) Option

WithBasePath used to define base path of server

func WithDetectDelay

func WithDetectDelay(t time.Duration) Option

WithDetectDelay define the delay of starting heartbeat detect

func WithHostAddr

func WithHostAddr(addr string) Option

WithHostAddr used to define host addr server listens

func WithThrift0

func WithThrift0() Option

WithThrift0 must be consistent will guidance.WithThriftII

func WithTransport

func WithTransport(tpt func(context.Context) http.RoundTripper) Option

WithTransport define your own http transport

type Options

type Options struct {
	BasePath    string
	Addr        string
	Dispatcher  distributed.Dispatcher
	Thrift      bool
	Transport   func(context.Context) http.RoundTripper
	DetectDelay time.Duration
}

func NewOptions

func NewOptions(opts ...Option) *Options

NewOptions used for both server and client

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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