wire

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package wire provides a generic wire transport.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileReadWriter

type FileReadWriter struct {
	// contains filtered or unexported fields
}

func NewFileReadWriter

func NewFileReadWriter(srcPath string, dstPath string) (*FileReadWriter, error)

func (*FileReadWriter) Close

func (f *FileReadWriter) Close() error

func (*FileReadWriter) Read

func (f *FileReadWriter) Read() ([]byte, error)

func (*FileReadWriter) Write

func (f *FileReadWriter) Write(b []byte) error

type InterfaceEndpoint

type InterfaceEndpoint struct {
	// contains filtered or unexported fields
}

func NewInterfaceEndpoint

func NewInterfaceEndpoint(intf string) *InterfaceEndpoint

func ParseInterfaceEndpoint

func ParseInterfaceEndpoint(ctx context.Context) (*InterfaceEndpoint, error)

func (*InterfaceEndpoint) NewContext

func (i *InterfaceEndpoint) NewContext(ctx context.Context) context.Context

type InterfaceReadWriter

type InterfaceReadWriter struct {
	// contains filtered or unexported fields
}

func NewInterfaceReadWriter

func NewInterfaceReadWriter(intf string) (*InterfaceReadWriter, error)

func (*InterfaceReadWriter) Close

func (i *InterfaceReadWriter) Close()

func (*InterfaceReadWriter) Read

func (i *InterfaceReadWriter) Read() ([]byte, error)

func (*InterfaceReadWriter) Write

func (i *InterfaceReadWriter) Write(b []byte) error

type PhysicalEndpoint

type PhysicalEndpoint struct {
	// contains filtered or unexported fields
}

func NewPhysicalEndpoint

func NewPhysicalEndpoint(device, intf string) *PhysicalEndpoint

func ParsePhysicalEndpoint

func ParsePhysicalEndpoint(ctx context.Context) (*PhysicalEndpoint, error)

func (*PhysicalEndpoint) NewContext

func (p *PhysicalEndpoint) NewContext(ctx context.Context) context.Context

type ReadWriter

type ReadWriter interface {
	Read() ([]byte, error)
	Write([]byte) error
}

type Stream

type Stream interface {
	Recv() (*wpb.Packet, error)
	Send(*wpb.Packet) error
}

type Wire

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

func NewWire

func NewWire(src ReadWriter) *Wire

func (*Wire) Transmit

func (w *Wire) Transmit(ctx context.Context, stream Stream) error

Directories

Path Synopsis
file
client
Package main provides an example wire client.
Package main provides an example wire client.
server
Package main provides an example wire server.
Package main provides an example wire server.
Package main provides the binary that executes forwarding over grpc wires.
Package main provides the binary that executes forwarding over grpc wires.
intf
client
Package main provides an example wire client.
Package main provides an example wire client.
server
Package main provides an example wire server.
Package main provides an example wire server.

Jump to

Keyboard shortcuts

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