Documentation ¶
Index ¶
- Constants
- type Admin
- type Auth
- type Cluster
- type Listener
- 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
type Auth ¶
type Auth struct { Type v1alpha1.AuthType Realm, Username, Password, Secret string Handler turn.AuthHandler // contains filtered or unexported fields }
Auth is the STUNner authenticator
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) ObjectName ¶
Name returns the name of the object
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) ObjectName ¶
Name returns the name of the object
type Object ¶
type Object interface { // ObjectName returns the name of the object ObjectName() string // 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)
NewListener creates a new cluster. Does not require a server restart
func NewListener ¶
NewListener creates a new listener. Requires a server restart (returns v1alpha1.ErrRestartRequired)