Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Error is a pkg/server error. Error = errs.Class("server error") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { tlsopts.Config Address string `user:"true" help:"public address to listen on" default:":7777"` PrivateAddress string `user:"true" help:"private address to listen on" default:"127.0.0.1:7778"` DisableQUIC bool `help:"disable QUIC listener on a server" hidden:"true" default:"false"` DisableTCPTLS bool `help:"disable TCP/TLS listener on a server" internal:"true"` DebugLogTraffic bool `hidden:"true" default:"false"` // Deprecated }
Config holds server specific configuration parameters.
type HybridConnector ¶ added in v1.22.1
type HybridConnector struct {
// contains filtered or unexported fields
}
HybridConnector implements a dialer that creates a connection using either quic or tcp.
func NewDefaultHybridConnector ¶ added in v1.22.1
func NewDefaultHybridConnector(qc *quic.Connector, tc *rpc.TCPConnector) HybridConnector
NewDefaultHybridConnector instantiates a new instance of HybridConnector with provided quic and tcp connectors. If a nil value is provided for either connector, a default connector will be created instead. See func DialContext for more details.
func (HybridConnector) DialContext ¶ added in v1.22.1
func (c HybridConnector) DialContext(ctx context.Context, tlsConfig *tls.Config, address string) (_ rpc.ConnectorConn, err error)
DialContext creates a connection using either quic or tcp. It tries to dial through both connector and returns the first established connection. If both connections are established, it will return quic connection. An error is returned if both connector failed.
func (*HybridConnector) SetQUICTransferRate ¶ added in v1.22.1
func (c *HybridConnector) SetQUICTransferRate(rate memory.Size)
SetQUICTransferRate returns a connector with the given transfer rate.
func (*HybridConnector) SetTCPTransferRate ¶ added in v1.22.1
func (c *HybridConnector) SetTCPTransferRate(rate memory.Size)
SetTCPTransferRate returns a connector with the given transfer rate.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents a bundle of services defined by a specific ID. Examples of servers are the satellite, the storagenode, and the uplink.
func (*Server) DRPC ¶ added in v0.21.0
DRPC returns the server's dRPC mux for registration purposes.
func (*Server) Identity ¶
func (p *Server) Identity() *identity.FullIdentity
Identity returns the server's identity.
func (*Server) PrivateAddr ¶
PrivateAddr returns the server's private listener address.
func (*Server) PrivateDRPC ¶ added in v0.21.0
PrivateDRPC returns the server's dRPC mux for registration purposes.