Documentation ¶
Index ¶
Constants ¶
View Source
const ( LatencyCheckInterval = 30 * time.Second LatencyCheckTimeout = 10 * time.Second )
View Source
const ( PrecedenceDefault Precedence = 0 PrecedenceRequired = 1 PrecedenceFailed = 2 PrecedenceDefaultLabel = "default" PrecedenceRequiredLabel = "required" PrecedenceFailedLabel = "failed" )
View Source
const (
MfaProviderZiti = "ziti"
)
Variables ¶
View Source
var DefaultOptions = &Options{ RefreshInterval: 5 * time.Minute, OnServiceUpdate: nil, }
Functions ¶
func SetAppInfo ¶ added in v0.15.11
func SetAppInfo(appId, appVersion string)
SetAppInfo sets the `appId` and `appVersion` to provide in SDK Information during all Ziti context authentications
func SetApplication ¶ added in v0.15.24
func SetApplication(theAppId, theAppVersion string)
Types ¶
type Context ¶
type Context interface { Authenticate() error GetCurrentIdentity() (*edge.CurrentIdentity, error) Dial(serviceName string) (edge.Conn, error) DialWithOptions(serviceName string, options *DialOptions) (edge.Conn, error) Listen(serviceName string) (edge.Listener, error) ListenWithOptions(serviceName string, options *ListenOptions) (edge.Listener, error) GetServiceId(serviceName string) (string, bool, error) GetServices() ([]edge.Service, error) GetService(serviceName string) (*edge.Service, bool) GetServiceTerminators(serviceName string, offset, limit int) ([]*edge.Terminator, int, error) GetSession(id string) (*edge.Session, error) Metrics() metrics.Registry // Close closes any connections open to edge routers Close() // Add a Ziti MFA handler, invoked during authentication AddZitiMfaHandler(handler func(query *edge.AuthQuery, resp func(code string) error) error) EnrollZitiMfa() (*api.MfaEnrollment, error) VerifyZitiMfa(code string) error RemoveZitiMfa(code string) error }
func NewContext ¶
func NewContext() Context
func NewContextWithConfig ¶
type ContextImplTest ¶ added in v0.15.32
type ContextImplTest struct {
Context
}
func (*ContextImplTest) GetApiSession ¶ added in v0.15.32
func (self *ContextImplTest) GetApiSession() (*edge.ApiSession, error)
func (*ContextImplTest) GetPostureCache ¶ added in v0.15.32
func (self *ContextImplTest) GetPostureCache() (*posture.Cache, error)
func (*ContextImplTest) GetSessions ¶ added in v0.15.32
func (self *ContextImplTest) GetSessions() ([]*edge.Session, error)
type DialOptions ¶ added in v0.13.47
func (DialOptions) GetConnectTimeout ¶ added in v0.13.47
func (d DialOptions) GetConnectTimeout() time.Duration
type ListenOptions ¶ added in v0.13.47
type ListenOptions struct { Cost uint16 Precedence Precedence ConnectTimeout time.Duration MaxConnections int Identity string BindUsingEdgeIdentity bool ManualStart bool }
func DefaultListenOptions ¶ added in v0.13.47
func DefaultListenOptions() *ListenOptions
type Precedence ¶ added in v0.13.47
type Precedence byte
func GetPrecedenceForLabel ¶ added in v0.15.3
func GetPrecedenceForLabel(p string) Precedence
func (Precedence) String ¶ added in v0.15.3
func (p Precedence) String() string
type ServiceEventType ¶ added in v0.15.17
type ServiceEventType string
const ( ServiceAdded ServiceEventType = "Added" ServiceRemoved ServiceEventType = "Removed" ServiceChanged ServiceEventType = "Changed" )
Click to show internal directories.
Click to hide internal directories.