Documentation ¶
Index ¶
- func CreateInboundPod(ctx context.Context, factory cmdutil.Factory, clientset *kubernetes.Clientset, ...) error
- func DetectAndDisableConflictDevice(origin string) error
- func Start(ctx context.Context, r Route) (chan error, error)
- type ConnectOptions
- func (c *ConnectOptions) ConnectPingRemote() bool
- func (c *ConnectOptions) DoConnect(ctx context.Context) (chan error, error)
- func (c *ConnectOptions) DoReverse(ctx context.Context) error
- func (c *ConnectOptions) GenerateTunIP(ctx context.Context) error
- func (c *ConnectOptions) GetClientSet() *kubernetes.Clientset
- func (c *ConnectOptions) GetLogger() *log.Logger
- func (c *ConnectOptions) GetUnstructuredObject(workload string) (*resource.Info, error)
- func (c *ConnectOptions) InitClient(ctx context.Context) (err error)
- func (c *ConnectOptions) InitDHCP(ctx context.Context) error
- func (c *ConnectOptions) IsEmpty() bool
- func (c *ConnectOptions) IsSameUid(another *ConnectOptions) bool
- func (c *ConnectOptions) Prepare(ctx context.Context) error
- func (c *ConnectOptions) ReleaseIP() error
- func (c *ConnectOptions) RemoveInboundPod() error
- func (c *ConnectOptions) RentIP(random bool) (ip *net.IPNet, err error)
- func (c *ConnectOptions) ReverePingLocal() bool
- func (c *ConnectOptions) SetLogger(logger *log.Logger)
- func (c *ConnectOptions) Shell(_ context.Context, workload string) (string, error)
- func (c *ConnectOptions) WaitTrafficManagerToAssignAnIP(log *log.Logger) error
- type Route
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateInboundPod ¶
func CreateInboundPod( ctx context.Context, factory cmdutil.Factory, clientset *kubernetes.Clientset, namespace, workloads, localTunIP, trafficManagerIP, shadowTunIP, routes string, ) error
CreateInboundPod 1, set replicset to 1 2, backup origin manifest to workloads annotation 3, patch a new sidecar
func DetectAndDisableConflictDevice ¶
DetectAndDisableConflictDevice will detect conflict route table and try to disable device 1, get route table 2, detect conflict 3, disable device
Types ¶
type ConnectOptions ¶
type ConnectOptions struct { Ctx context.Context `json:"-"` Uid string KubeconfigPath string KubeconfigBytes []byte Namespace string Workloads []string // contains filtered or unexported fields }
func (*ConnectOptions) ConnectPingRemote ¶
func (c *ConnectOptions) ConnectPingRemote() bool
func (*ConnectOptions) DoConnect ¶
func (c *ConnectOptions) DoConnect(ctx context.Context) (chan error, error)
func (*ConnectOptions) GenerateTunIP ¶
func (c *ConnectOptions) GenerateTunIP(ctx context.Context) error
GenerateTunIP TODO optimize code, can use patch ?
func (*ConnectOptions) GetClientSet ¶
func (c *ConnectOptions) GetClientSet() *kubernetes.Clientset
func (*ConnectOptions) GetLogger ¶
func (c *ConnectOptions) GetLogger() *log.Logger
func (*ConnectOptions) GetUnstructuredObject ¶
func (c *ConnectOptions) GetUnstructuredObject(workload string) (*resource.Info, error)
func (*ConnectOptions) InitClient ¶
func (c *ConnectOptions) InitClient(ctx context.Context) (err error)
func (*ConnectOptions) IsEmpty ¶
func (c *ConnectOptions) IsEmpty() bool
func (*ConnectOptions) IsSameUid ¶
func (c *ConnectOptions) IsSameUid(another *ConnectOptions) bool
func (*ConnectOptions) ReleaseIP ¶
func (c *ConnectOptions) ReleaseIP() error
func (*ConnectOptions) RemoveInboundPod ¶
func (c *ConnectOptions) RemoveInboundPod() error
func (*ConnectOptions) RentIP ¶
func (c *ConnectOptions) RentIP(random bool) (ip *net.IPNet, err error)
func (*ConnectOptions) ReverePingLocal ¶
func (c *ConnectOptions) ReverePingLocal() bool
func (*ConnectOptions) SetLogger ¶
func (c *ConnectOptions) SetLogger(logger *log.Logger)
func (*ConnectOptions) WaitTrafficManagerToAssignAnIP ¶
func (c *ConnectOptions) WaitTrafficManagerToAssignAnIP(log *log.Logger) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.