Documentation ¶
Index ¶
- type BufferedChunk
- type CloseObserver
- type ConnObserver
- type EndServer
- type NKNConn
- func (c *NKNConn) Close() error
- func (c *NKNConn) LocalAddr() net.Addr
- func (c *NKNConn) Read(b []byte) (n int, err error)
- func (c *NKNConn) RemoteAddr() net.Addr
- func (c *NKNConn) SetDeadline(t time.Time) error
- func (c *NKNConn) SetReadDeadline(t time.Time) error
- func (c *NKNConn) SetWriteDeadline(t time.Time) error
- func (c *NKNConn) Write(b []byte) (n int, err error)
- type NKNListener
- type ReadObserver
- type ReadStatus
- type RedunantAddr
- type RedundantClient
- type ResiListener
- func (l *ResiListener) Connected(fd *Socket)
- func (l *ResiListener) GetSocket(ctx context.Context) (*Socket, error)
- func (l *ResiListener) Modify(ctx context.Context, req *protos.ModifyRequest) (*protos.ModifyResponse, error)
- func (l *ResiListener) NKNAddr() net.Addr
- func (l *ResiListener) Serve()
- func (l *ResiListener) Stop()
- func (l *ResiListener) TcpAddr() net.Addr
- func (l *ResiListener) Test(ctx context.Context, req *protos.TestRequest) (*protos.TestResponse, error)
- type ResiListenerOptions
- type Socket
- func (a *Socket) Absorb(b *Socket)
- func (a *Socket) AddSocket(fd net.Conn)
- func (a *Socket) Close() error
- func (a *Socket) DropSocket(fd net.Conn) error
- func (a *Socket) LocalAddr() net.Addr
- func (a *Socket) LocalAddrs() []net.Addr
- func (a *Socket) Read(b []byte) (n int, err error)
- func (a *Socket) RemoteAddr() net.Addr
- func (a *Socket) SetDeadline(t time.Time) error
- func (a *Socket) SetReadDeadline(t time.Time) error
- func (a *Socket) SetWriteDeadline(t time.Time) error
- func (a *Socket) Write(b []byte) (n int, err error)
- type SocketAddr
- type SocketListener
- type WriteFormatter
- type WriteOperation
- type WriteStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BufferedChunk ¶
type BufferedChunk struct {
// contains filtered or unexported fields
}
type CloseObserver ¶
type CloseObserver func(*ConnObserver, net.Conn)
type ConnObserver ¶
type ConnObserver struct { WriteObserver WriteFormatter ReadObserver ReadObserver CloseObserver CloseObserver // contains filtered or unexported fields }
func NewConnObserver ¶
func NewConnObserver( fd net.Conn, sz int, write WriteFormatter, read ReadObserver, cl CloseObserver, ) *ConnObserver
func (*ConnObserver) Close ¶
func (c *ConnObserver) Close() error
func (*ConnObserver) Fd ¶
func (c *ConnObserver) Fd() net.Conn
func (*ConnObserver) LocalAddr ¶
func (c *ConnObserver) LocalAddr() net.Addr
func (*ConnObserver) RemoteAddr ¶
func (c *ConnObserver) RemoteAddr() net.Addr
func (*ConnObserver) Write ¶
func (c *ConnObserver) Write(buf []byte)
type EndServer ¶
type EndServer struct {
protos.UnimplementedEsiServer
}
func (*EndServer) Test ¶
func (s *EndServer) Test( ctx context.Context, req *protos.TestRequest, ) (*protos.TestResponse, error)
type NKNConn ¶
type NKNConn struct {
// contains filtered or unexported fields
}
func (*NKNConn) RemoteAddr ¶
type NKNListener ¶
type NKNListener struct {
// contains filtered or unexported fields
}
func NewNKNListener ¶
func NewNKNListener(seed string) (*NKNListener, error)
func (*NKNListener) Addr ¶
func (l *NKNListener) Addr() net.Addr
func (*NKNListener) Close ¶
func (l *NKNListener) Close() error
type ReadObserver ¶
type ReadObserver func(*ConnObserver, []byte) ([]byte, error)
type ReadStatus ¶
type ReadStatus struct {
// contains filtered or unexported fields
}
type RedundantClient ¶
type RedundantClient struct {
// contains filtered or unexported fields
}
func RedundantDial ¶
func RedundantDial(addr RedunantAddr) (*RedundantClient, error)
func (*RedundantClient) Addrs ¶
func (c *RedundantClient) Addrs() []net.Addr
func (*RedundantClient) Inner ¶
func (c *RedundantClient) Inner() protos.EsiClient
type ResiListener ¶
type ResiListener struct { protos.UnimplementedEsiServer // contains filtered or unexported fields }
func NewResiListener ¶
func NewResiListener(options ResiListenerOptions) (*ResiListener, error)
func (*ResiListener) Connected ¶
func (l *ResiListener) Connected(fd *Socket)
func (*ResiListener) GetSocket ¶
func (l *ResiListener) GetSocket(ctx context.Context) (*Socket, error)
func (*ResiListener) Modify ¶
func (l *ResiListener) Modify( ctx context.Context, req *protos.ModifyRequest, ) (*protos.ModifyResponse, error)
func (*ResiListener) NKNAddr ¶
func (l *ResiListener) NKNAddr() net.Addr
func (*ResiListener) Serve ¶
func (l *ResiListener) Serve()
func (*ResiListener) Stop ¶
func (l *ResiListener) Stop()
func (*ResiListener) TcpAddr ¶
func (l *ResiListener) TcpAddr() net.Addr
func (*ResiListener) Test ¶
func (l *ResiListener) Test( ctx context.Context, req *protos.TestRequest, ) (*protos.TestResponse, error)
type ResiListenerOptions ¶
type Socket ¶
type Socket struct { Debug bool // contains filtered or unexported fields }
func (*Socket) LocalAddrs ¶
func (*Socket) RemoteAddr ¶
type SocketAddr ¶
func (SocketAddr) Network ¶
func (addr SocketAddr) Network() string
func (SocketAddr) String ¶
func (addr SocketAddr) String() string
type SocketListener ¶
type SocketListener struct {
// contains filtered or unexported fields
}
func NewSocketListener ¶
func NewSocketListener(listeners []net.Listener) *SocketListener
func (*SocketListener) Addr ¶
func (l *SocketListener) Addr() net.Addr
func (*SocketListener) Close ¶
func (l *SocketListener) Close() error
func (*SocketListener) SetAcceptObserver ¶
func (l *SocketListener) SetAcceptObserver(ch chan net.Conn)
type WriteFormatter ¶
type WriteFormatter func(*ConnObserver, []byte) []byte
type WriteOperation ¶
type WriteOperation struct {
// contains filtered or unexported fields
}
type WriteStatus ¶
type WriteStatus struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.