action

package
v2.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 45 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusOk     = "Connected"
	StatusFailed = "Disconnected"

	ModeFull = "full"
	ModeLite = "lite"
)

Variables

View Source
var CancelFunc = make(map[string]context.CancelFunc)
View Source
var DefaultServerIP = (&net.IPNet{IP: config.DockerRouterIP, Mask: net.CIDRMask(bits, bits)}).String()

Functions

func GetDaemonLogPath

func GetDaemonLogPath() string

Types

type Server

type Server struct {
	rpc.UnimplementedDaemonServer

	Cancel    func()
	GetClient func(isSudo bool) rpc.DaemonClient
	IsSudo    bool
	LogFile   *lumberjack.Logger
	Lock      sync.Mutex

	ID string
	// contains filtered or unexported fields
}

func (*Server) Clone

func (svr *Server) Clone(req *rpc.CloneRequest, resp rpc.Daemon_CloneServer) (err error)

func (*Server) ConfigAdd

func (svr *Server) ConfigAdd(ctx context.Context, req *rpc.ConfigAddRequest) (resp *rpc.ConfigAddResponse, err error)

func (*Server) ConfigRemove

func (svr *Server) ConfigRemove(ctx context.Context, req *rpc.ConfigRemoveRequest) (*rpc.ConfigRemoveResponse, error)

func (*Server) Connect

func (svr *Server) Connect(req *rpc.ConnectRequest, resp rpc.Daemon_ConnectServer) (e error)

func (*Server) ConnectFork

func (svr *Server) ConnectFork(req *rpc.ConnectRequest, resp rpc.Daemon_ConnectForkServer) (err error)

func (*Server) Disconnect

func (svr *Server) Disconnect(req *rpc.DisconnectRequest, resp rpc.Daemon_DisconnectServer) error

func (*Server) Get

func (svr *Server) Get(ctx context.Context, req *rpc.GetRequest) (*rpc.GetResponse, error)

func (*Server) Identify added in v2.2.9

func (svr *Server) Identify(ctx context.Context, req *rpc.IdentifyRequest) (*rpc.IdentifyResponse, error)

func (*Server) Leave

func (svr *Server) Leave(req *rpc.LeaveRequest, resp rpc.Daemon_LeaveServer) error

func (*Server) List

func (svr *Server) List(ctx context.Context, req *rpc.ListRequest) (*rpc.ListResponse, error)

func (*Server) Logs

func (svr *Server) Logs(req *rpc.LogRequest, resp rpc.Daemon_LogsServer) error

func (*Server) Proxy

func (svr *Server) Proxy(req *rpc.ConnectRequest, resp rpc.Daemon_ProxyServer) (e error)

Proxy

  1. if not connect to cluster 1.1 connect to cluster 1.2 proxy workloads
  2. if already connect to cluster 2.1 disconnect from cluster 2.2 same as step 1

func (*Server) Quit

func (svr *Server) Quit(req *rpc.QuitRequest, resp rpc.Daemon_QuitServer) error

func (*Server) Remove

func (svr *Server) Remove(req *rpc.RemoveRequest, resp rpc.Daemon_RemoveServer) error

func (*Server) Reset added in v2.2.3

func (svr *Server) Reset(req *rpc.ResetRequest, resp rpc.Daemon_ResetServer) error

func (*Server) SshStart

func (svr *Server) SshStart(ctx context.Context, req *rpc.SshStartRequest) (resp *rpc.SshStartResponse, err error)

func (*Server) SshStop

func (svr *Server) SshStop(ctx context.Context, req *rpc.SshStopRequest) (*rpc.SshStopResponse, error)

func (*Server) Status

func (svr *Server) Status(ctx context.Context, req *rpc.StatusRequest) (*rpc.StatusResponse, error)

func (*Server) Stop

func (svr *Server) Stop(req *rpc.QuitRequest, resp rpc.Daemon_QuitServer) error

func (*Server) Upgrade

func (svr *Server) Upgrade(ctx context.Context, req *rpc.UpgradeRequest) (*rpc.UpgradeResponse, error)

func (*Server) Version

func (svr *Server) Version(ctx context.Context, req *rpc.VersionRequest) (*rpc.VersionResponse, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL