Documentation ¶
Index ¶
- Constants
- Variables
- func DoHTTP(in interface{}, out interface{}, hp *HTTPParam) error
- func DoHTTPWithRetry(in interface{}, out interface{}, hp *HTTPParam, waitTime time.Duration, ...) error
- func GetHandshakePathOfEndpoint(endpoint v1alpha1.DomainEndpoint) string
- func GetHandshakePathOfPrefix(pathPrefix string) string
- func GetHandshakePathSuffix() string
- func GetHostname() string
- func GetPrefixIfPresent(endpoint v1alpha1.DomainEndpoint) string
- func IsReverseTunnelTransit(transit *v1alpha1.Transit) bool
- func IsThirdPartyTransit(transit *v1alpha1.Transit) bool
- func IsTransit(transit *v1alpha1.Transit) bool
- func ParseURL(url string) (string, string, uint32, string, error)
- func ProbePeerEndpoint(endpointURL string) error
- type HTTPParam
- type Whitelist
- type WhitelistChecker
- type WhitelistItem
Constants ¶
View Source
const ( DomainAPIServer = "apiserver.master.svc" ServiceMasterProxy = "masterproxy" ServiceAPIServer = "apiserver" ServiceKusciaStorage = "kusciastorage" ServiceHandshake = "kuscia-handshake" ServiceKusciaAPI = "kusciaapi" EnvoyClusterName = "envoy-cluster" )
View Source
const ( HeaderTransitHash = "Kuscia-Transit-Hash" HeaderTransitFlag = "Kuscia-Transit-Flag" )
View Source
const KusciaEnvoyMsgHeaderKey = "Kuscia-Error-Message"
Variables ¶
View Source
var (
InternalServer = "http://127.0.0.1:80"
)
Functions ¶
func DoHTTPWithRetry ¶
func GetHandshakePathOfEndpoint ¶
func GetHandshakePathOfEndpoint(endpoint v1alpha1.DomainEndpoint) string
func GetHandshakePathSuffix ¶
func GetHandshakePathSuffix() string
func GetHostname ¶
func GetHostname() string
func GetPrefixIfPresent ¶
func GetPrefixIfPresent(endpoint v1alpha1.DomainEndpoint) string
func IsReverseTunnelTransit ¶
func IsThirdPartyTransit ¶
func ProbePeerEndpoint ¶
Types ¶
type Whitelist ¶
type Whitelist struct {
Items []WhitelistItem `yaml:"items,omitempty"`
}
func NewWhitelistChecker ¶
Init a new whitelist checker from given file path, returns nil if any error occurs.
type WhitelistChecker ¶
type WhitelistItem ¶
type WhitelistItem struct { // address may be an ip 127.0.0.1, a CIDR 10.0.0.1/24, or an explicit hostname gw.abc.com Address string `yaml:"address,omitempty"` // optional config for allow ports, none means all ports are acceptable Ports []uint32 `yaml:"ports,omitempty"` // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.