Documentation ¶
Overview ¶
Package infraenv contains convenience function common to SCION infra services.
Index ¶
Constants ¶
const (
ErrAppUnableToInitMessenger common.ErrMsg = "Unable to initialize SCION Infra Messenger"
)
Variables ¶
This section is empty.
Functions ¶
func GenerateTLSConfig ¶ added in v0.6.0
GenerateTLSConfig generates a self-signed certificate.
func InitInfraEnvironment ¶ added in v0.4.0
func InitInfraEnvironment(topologyPath string)
func InitInfraEnvironmentFunc ¶ added in v0.4.0
func InitInfraEnvironmentFunc(topologyPath string, f func())
InitInfraEnvironmentFunc sets up the environment by first calling env.RealoadTopology and then the provided function.
Types ¶
type NetworkConfig ¶ added in v0.4.0
type NetworkConfig struct { // IA is the local AS number. IA addr.IA // Public is the Internet-reachable address in the case where the service // is behind NAT. Public *net.UDPAddr // ReconnectToDispatcher sets up sockets that automatically reconnect if // the dispatcher closes the connection (e.g., if the dispatcher goes // down). ReconnectToDispatcher bool // QUIC contains configuration details for QUIC servers. If the listening // address is the empty string, then no QUIC socket is opened. QUIC QUIC // SVCRouter is used to discover the underlay addresses of intra-AS SVC // servers. SVCRouter messenger.LocalSVCRouter // SCMPHandler is the SCMP handler to use. This handler is only applied to // client connections. The connection the server listens on will always // ignore SCMP messages. Otherwise, the server will shutdown when receiving // an SCMP error message. SCMPHandler snet.SCMPHandler }
NetworkConfig describes the networking configuration of a SCION control-plane RPC endpoint.
func (*NetworkConfig) AddressRewriter ¶ added in v0.4.0
func (nc *NetworkConfig) AddressRewriter( connFactory snet.PacketDispatcherService) *messenger.AddressRewriter
AddressRewriter initializes path and svc resolvers for infra servers.
The connection factory is used to open sockets for SVC resolution requests. If the connection factory is nil, the default connection factory is used.
func (*NetworkConfig) QUICStack ¶ added in v0.6.0
func (nc *NetworkConfig) QUICStack() (*QUICStack, error)
type QUIC ¶ added in v0.4.0
type QUIC struct { // Address is the UDP address to start the QUIC server on. Address string }
QUIC contains the QUIC configuration for control-plane speakers.
type QUICStack ¶ added in v0.6.0
type QUICStack struct { Listener *squic.ConnListener Dialer *squic.ConnDialer RedirectCloser func() }
QUICStack contains everything to run a QUIC based RPC stack.