Documentation
¶
Index ¶
- Constants
- func SharedKey(sharedKey []byte) func(clientHostname string) (sharedKey []byte, err error)
- type AsciiFormatter
- type AuthClient
- type AuthServer
- type Client
- type ClientOptions
- type Credentials
- type Error
- type Server
- type ServerOptions
- type ServerSession
- func (ss *ServerSession) Buffered() int
- func (ss *ServerSession) Close() error
- func (ss *ServerSession) ID() uint64
- func (ss *ServerSession) Log(str string, args ...any)
- func (ss *ServerSession) Next(e *transport.Entry) (err error)
- func (ss *ServerSession) Rewind()
- func (ss *ServerSession) TimeConnected() time.Time
- func (ss *ServerSession) TotalRead() int
- func (ss *ServerSession) Username() string
Constants ¶
View Source
const ( ErrInvalidHelo = Error("invalid HELO") ErrInvalidPing = Error("invalid PING") ErrInvalidPong = Error("invalid PONG") ErrInvalidNonce = Error("invalid nonce") ErrInvalidEntry = Error("invalid entry") ErrFailedConn = Error("failed connection") ErrFailedAuth = Error("failed authentication") ErrNotSupported = Error("not supported") )
View Source
const ( HELO = "HELO" PING = "PING" PONG = "PONG" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AsciiFormatter ¶ added in v0.9.0
type AsciiFormatter struct {
// contains filtered or unexported fields
}
func NewAsciiFormatter ¶ added in v0.9.0
func NewAsciiFormatter(w io.Writer) *AsciiFormatter
Formats log messages from Fluent Forward protocol into ASCII. Handy for debugging - do not use in production.
type AuthClient ¶
type AuthClient func(ctx context.Context) (Credentials, error)
func StaticAuthClient ¶
func StaticAuthClient(cred Credentials) AuthClient
type AuthServer ¶
type AuthServer func(ctx context.Context, username string) (Credentials, error)
func StaticAuthServer ¶
func StaticAuthServer(cred Credentials) AuthServer
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(addr string, opt ClientOptions) *Client
type ClientOptions ¶
type ClientOptions struct {
Hostname string
Auth AuthClient
TLS bool
}
type Credentials ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(opt ServerOptions) *Server
type ServerOptions ¶
type ServerSession ¶ added in v0.6.0
type ServerSession struct {
// contains filtered or unexported fields
}
func (*ServerSession) Buffered ¶ added in v0.6.0
func (ss *ServerSession) Buffered() int
func (*ServerSession) Close ¶ added in v0.6.0
func (ss *ServerSession) Close() error
func (*ServerSession) ID ¶ added in v0.6.0
func (ss *ServerSession) ID() uint64
func (*ServerSession) Log ¶ added in v0.6.0
func (ss *ServerSession) Log(str string, args ...any)
func (*ServerSession) Next ¶ added in v0.6.0
func (ss *ServerSession) Next(e *transport.Entry) (err error)
func (*ServerSession) Rewind ¶ added in v0.6.0
func (ss *ServerSession) Rewind()
func (*ServerSession) TimeConnected ¶ added in v0.6.0
func (ss *ServerSession) TimeConnected() time.Time
func (*ServerSession) TotalRead ¶ added in v0.6.0
func (ss *ServerSession) TotalRead() int
func (*ServerSession) Username ¶ added in v0.6.0
func (ss *ServerSession) Username() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.