polish

package
v3.0.23 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: MIT Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientConfig

type ClientConfig interface {
	Construct() (Connection, error)
}

type Connection

type Connection interface {
	Handshake(conn net.Conn) (net.Conn, error)
}

func NewDarkStarClient added in v3.0.3

func NewDarkStarClient(config DarkStarPolishClientConfig) Connection

type DarkStarPolishClientConfig added in v3.0.3

type DarkStarPolishClientConfig struct {
	ServerAddress   string `json:"serverAddress"`
	ServerPublicKey string `json:"serverPublicKey"`
}

func NewDarkStarPolishClientConfig added in v3.0.3

func NewDarkStarPolishClientConfig(serverPublicKey []byte) (*DarkStarPolishClientConfig, error)

func NewDarkStarPolishClientConfigFromPrivate added in v3.0.3

func NewDarkStarPolishClientConfigFromPrivate(serverPrivateKey crypto.PrivateKey) (*DarkStarPolishClientConfig, error)

func (DarkStarPolishClientConfig) Construct added in v3.0.3

func (clientConfig DarkStarPolishClientConfig) Construct() (Connection, error)

type DarkStarPolishClientConnection added in v3.0.3

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

func (*DarkStarPolishClientConnection) Handshake added in v3.0.3

func (clientConn *DarkStarPolishClientConnection) Handshake(conn net.Conn) (net.Conn, error)

type DarkStarPolishServer added in v3.0.3

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

func NewDarkStarServer added in v3.0.3

func NewDarkStarServer(config DarkStarPolishServerConfig) DarkStarPolishServer

func (DarkStarPolishServer) NewConnection added in v3.0.3

func (server DarkStarPolishServer) NewConnection(conn net.Conn) Connection

type DarkStarPolishServerConfig added in v3.0.3

type DarkStarPolishServerConfig struct {
	ServerAddress    string `json:"serverAddress"`
	ServerPrivateKey string `json:"serverPrivateKey"`
}

func NewDarkStarPolishServerConfig added in v3.0.3

func NewDarkStarPolishServerConfig() (*DarkStarPolishServerConfig, error)

func (DarkStarPolishServerConfig) Construct added in v3.0.3

func (serverConfig DarkStarPolishServerConfig) Construct() (Server, error)

type DarkStarPolishServerConnection added in v3.0.3

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

func (*DarkStarPolishServerConnection) Handshake added in v3.0.3

func (serverConn *DarkStarPolishServerConnection) Handshake(conn net.Conn) (net.Conn, error)

TODO: handshake behavior is already performed in DarkStarPolishServer.darkStarServer.StreamConn()

type Server

type Server interface {
	NewConnection(net.Conn) Connection
}

type ServerConfig

type ServerConfig interface {
	Construct() (Server, error)
}

Jump to

Keyboard shortcuts

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