transport

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package transport defines a common interface for network connections that have an associated client identity.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateClientIdentity

func ValidateClientIdentity(in string) error

A client identity must be a single component in a ZFS filesystem path

Types

type AuthConn

type AuthConn struct {
	Wire
	// contains filtered or unexported fields
}

func NewAuthConn

func NewAuthConn(conn Wire, clientIdentity string) *AuthConn

func (*AuthConn) ClientIdentity

func (c *AuthConn) ClientIdentity() string

func (AuthConn) SyscallConn

func (a AuthConn) SyscallConn() (rawConn syscall.RawConn, err error)

type AuthenticatedListener

type AuthenticatedListener interface {
	Addr() net.Addr
	Accept(ctx context.Context) (*AuthConn, error)
	Close() error
}

like net.Listener, but with an AuthenticatedConn instead of net.Conn

type AuthenticatedListenerFactory

type AuthenticatedListenerFactory func() (AuthenticatedListener, error)

type Connecter

type Connecter interface {
	Connect(ctx context.Context) (Wire, error)
}

type Logger

type Logger = logger.Logger

func GetLogger

func GetLogger(ctx context.Context) Logger

type Wire

type Wire = timeoutconn.Wire

Directories

Path Synopsis
Package fromconfig instantiates transports based on zrepl config structures (see package config).
Package fromconfig instantiates transports based on zrepl config structures (see package config).

Jump to

Keyboard shortcuts

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