Documentation ¶
Index ¶
- func SplitHostPort(addr string) (host string, port int, err error)
- type Balancer
- type Endpoint
- type Handler
- type Handlers
- type Listener
- func (ln *Listener) Accept() (net.Conn, error)
- func (ln *Listener) Addr() net.Addr
- func (ln *Listener) Close() error
- func (ln *Listener) DialContext(ctx context.Context) (net.Conn, error)
- func (ln *Listener) DialGRPC() (*grpc.ClientConn, error)
- func (ln *Listener) HostPort() (host string, port int, err error)
- type RequestParser
- type ResponseMapper
- type YDB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Endpoint ¶
type Endpoint struct {
// contains filtered or unexported fields
}
func (*Endpoint) DialContext ¶
func (*Endpoint) ServerConn ¶
type Handler ¶
type Handler func(ctx context.Context, req RequestParser) (res interface{}, err error)
func SuccessHandler ¶
func SuccessHandler(f ResponseMapper) Handler
type Listener ¶
type Listener struct { Client chan net.Conn Server chan net.Conn Closed chan struct{} // contains filtered or unexported fields }
func NewListener ¶
func NewListener() *Listener
func (*Listener) DialContext ¶
type RequestParser ¶
type RequestParser func(interface{})
type ResponseMapper ¶
type ResponseMapper func(RequestParser) proto.Message
func Ident ¶
func Ident(res proto.Message) ResponseMapper
type YDB ¶
type YDB struct { Database string Handlers Handlers T testing.TB // contains filtered or unexported fields }
func (*YDB) DialContext ¶
func (*YDB) StartBalancer ¶
StartBalancer starts to provide a discovery service on some local address.
func (*YDB) StartEndpoint ¶
StartEndpoint starts to provide a YDB service on some local address.
Click to show internal directories.
Click to hide internal directories.