Files
zeekay 241625e7d9 rename: ziti → zt across all paths
- Repo names: ziti-* → zt-*
- Go modules: github.com/hanzozt/ziti → github.com/hanzozt/zt
- Docker images: hanzozt/ziti-* → hanzozt/zt-*
- C/Java/JS symbols: ziti_* → zt_*
- File and directory names updated
2026-02-18 18:34:19 -08:00

46 lines
1.0 KiB
Go

package xgress_router
import (
"time"
"github.com/hanzozt/identity"
"github.com/hanzozt/sdk-golang/xgress"
"github.com/hanzozt/zt/v2/common/logcontext"
"github.com/hanzozt/zt/v2/controller/xt"
)
type Listener interface {
Listen(address string, bindHandler xgress.BindHandler) error
Close() error
}
type DialParams interface {
GetCtrlId() string
GetDestination() string
GetCircuitId() *identity.TokenId
GetAddress() xgress.Address
GetBindHandler() xgress.BindHandler
GetLogContext() logcontext.Context
GetDeadline() time.Time
GetCircuitTags() map[string]string
}
type Dialer interface {
Dial(params DialParams) (xt.PeerData, error)
IsTerminatorValid(id string, destination string) bool
}
type InspectableDialer interface {
Dialer
InspectTerminator(id string, destination string, fixInvalid bool) (bool, string)
}
type Inspectable interface {
Inspect(key string, timeout time.Duration) any
}
type Factory interface {
CreateListener(optionsData xgress.OptionsData) (Listener, error)
CreateDialer(optionsData xgress.OptionsData) (Dialer, error)
}