Documentation ¶
Index ¶
- Constants
- type Admin
- type AdminFactory
- type Auth
- type AuthFactory
- type Cluster
- type ClusterFactory
- type Factory
- type Listener
- type ListenerFactory
- type Object
- func NewAdmin(conf v1alpha1.Config, logger logging.LoggerFactory) (Object, error)
- func NewAuth(conf v1alpha1.Config, logger logging.LoggerFactory) (Object, error)
- func NewCluster(conf v1alpha1.Config, resolver resolver.DnsResolver, ...) (Object, error)
- func NewListener(conf v1alpha1.Config, net *vnet.Net, logger logging.LoggerFactory) (Object, error)
Constants ¶
const DefaultAdminObjectName = "DefaultAdmin"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Admin ¶
type Admin struct {
Name, LogLevel string
// contains filtered or unexported fields
}
Admin is the main object holding STUNner administration info
func (*Admin) Inspect ¶ added in v0.10.5
Inspect examines whether a configuration change on the object would require a restart. An empty new-config means it is about to be deleted, an empty old-config means it is to be deleted, otherwise it will be reconciled from the old configuration to the new one
type AdminFactory ¶ added in v0.10.5
type AdminFactory struct {
// contains filtered or unexported fields
}
AdminFactory can create now Admin objects
type Auth ¶
type Auth struct { Type v1alpha1.AuthType Realm, Username, Password, Secret string Log logging.LeveledLogger }
Auth is the STUNner authenticator
func (*Auth) Inspect ¶ added in v0.10.5
Inspect examines whether a configuration change on the object would require a restart. An empty new-config means it is about to be deleted, an empty old-config means it is to be deleted, otherwise it will be reconciled from the old configuration to the new one
type AuthFactory ¶ added in v0.10.5
type AuthFactory struct {
// contains filtered or unexported fields
}
AuthFactory can create now Auth objects
type Cluster ¶
type Cluster struct { Name string Type v1alpha1.ClusterType Endpoints []net.IPNet Domains []string Resolver resolver.DnsResolver // for strict DNS // contains filtered or unexported fields }
Listener implements a STUNner cluster
func (*Cluster) Inspect ¶ added in v0.10.5
Inspect examines whether a configuration change on the object would require a restart. An empty new-config means it is about to be deleted, an empty old-config means it is to be deleted, otherwise it will be reconciled from the old configuration to the new one
func (*Cluster) ObjectName ¶
Name returns the name of the object
type ClusterFactory ¶ added in v0.10.5
type ClusterFactory struct {
// contains filtered or unexported fields
}
ClusterFactory can create now Cluster objects
type Factory ¶ added in v0.10.5
type Factory interface { // New will spawn a new object from the factory New(conf v1alpha1.Config) (Object, error) }
Factory can create new objects
func NewAdminFactory ¶ added in v0.10.5
func NewAdminFactory(logger logging.LoggerFactory) Factory
NewAdminFactory creates a new factory for Admin objects
func NewAuthFactory ¶ added in v0.10.5
func NewAuthFactory(logger logging.LoggerFactory) Factory
NewAuthFactory creates a new factory for Auth objects
func NewClusterFactory ¶ added in v0.10.5
func NewClusterFactory(resolver resolver.DnsResolver, logger logging.LoggerFactory) Factory
NewClusterFactory creates a new factory for Cluster objects
func NewListenerFactory ¶ added in v0.10.5
func NewListenerFactory(net *vnet.Net, logger logging.LoggerFactory) Factory
NewListenerFactory creates a new factory for Listener objects
type Listener ¶
type Listener struct { Name string Proto v1alpha1.ListenerProtocol Addr net.IP Port, MinPort, MaxPort int Cert, Key string // net.IP.String() may rewrite the string representation Conn interface{} // either turn.ListenerConfig or turn.PacketConnConfig Routes []string Net *vnet.Net // contains filtered or unexported fields }
Listener implements a STUNner listener
func (*Listener) Inspect ¶ added in v0.10.5
Inspect examines whether a configuration change on the object would require a restart. An empty new-config means it is about to be deleted, an empty old-config means it is to be deleted, otherwise it will be reconciled from the old configuration to the new one
func (*Listener) ObjectName ¶
Name returns the name of the object
type ListenerFactory ¶ added in v0.10.5
type ListenerFactory struct {
// contains filtered or unexported fields
}
ListenerFactory can create now Listener objects
type Object ¶
type Object interface { // ObjectName returns the name of the object ObjectName() string // Inspect examines whether a configuration change on the object would require a restart Inspect(old, new v1alpha1.Config) bool // Reconcile updates the object for a new configuration, may return ErrRestartRequired Reconcile(conf v1alpha1.Config) error // GetConfig returns the configuration of the running authenticator GetConfig() v1alpha1.Config // Close closes the object, may return ErrRestartRequired Close() error }
Object is the high-level interface for all STUNner objects like listeners, clusters, etc.
func NewAdmin ¶
NewAdmin creates a new Admin object. Requires a server restart (returns v1alpha1.ErrRestartRequired)
func NewAuth ¶
NewAuth creates a new authenticator. Requires a server restart (returns v1alpha1.ErrRestartRequired)
func NewCluster ¶
func NewCluster(conf v1alpha1.Config, resolver resolver.DnsResolver, logger logging.LoggerFactory) (Object, error)
NewCluster creates a new cluster. Requires a server restart (returns v1alpha1.ErrRestartRequired)
func NewListener ¶
NewListener creates a new listener. Requires a server restart (returns v1alpha1.ErrRestartRequired)