slaver

package
v0.0.0-...-9c8d8c7 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const IngressCheckPath = "/c7n/acme-challenge"

Variables

This section is empty.

Functions

func RandomToken

func RandomToken(length int) string

Types

type Dir

type Dir struct {
	Mode string
	Own  string
	Path string
}

type Forward

type Forward struct {
	Url    string              `json:"url"`
	Body   string              `json:"body"`
	Method string              `json:"method"`
	Header map[string][]string `json:"header"`
}

type Request

type Request struct {
	Url    string
	Method string
	Body   string
}

type Slaver

type Slaver struct {
	Client          kubernetes.Interface
	Version         string
	Namespace       string
	Name            string
	CommonLabels    map[string]string
	Image           string
	Ports           []core_v1.ContainerPort
	Env             []core_v1.EnvVar
	VolumeMounts    []core_v1.VolumeMount
	ImagePullPolicy core_v1.PullPolicy `yaml:"imagePullPolicy"`
	PodList         *core_v1.PodList
	Address         string
	GRpcAddress     string
	PvcName         string
	DataPath        string
}

func (*Slaver) CheckClusterDomain

func (s *Slaver) CheckClusterDomain(domain string) error

func (*Slaver) CheckHealth

func (s *Slaver) CheckHealth(name string, check *pb.Check) bool

func (*Slaver) CheckInstall

func (s *Slaver) CheckInstall() (*v1.DaemonSet, error)

* Type: httpGet or socket

func (*Slaver) CheckRunning

func (s *Slaver) CheckRunning() bool

func (*Slaver) ExecuteRemoteCommand

func (s *Slaver) ExecuteRemoteCommand(commands []string) bool

func (*Slaver) ExecuteRemoteRequest

func (s *Slaver) ExecuteRemoteRequest(f Forward) (string, error)

func (*Slaver) ExecuteRemoteSql

func (s *Slaver) ExecuteRemoteSql(sqlList []string, resource *c7ncfg.Resource, database, sqlType string) error

func (*Slaver) ForwardPort

func (s *Slaver) ForwardPort(portName string, stopCh <-chan struct{}) int

func (*Slaver) GetPods

func (s *Slaver) GetPods() (*core_v1.PodList, error)

func (*Slaver) InitSalver

func (s *Slaver) InitSalver(clientset *kubernetes.Clientset, namespace string, stopCh <-chan struct{}) (*Slaver, error)

func (*Slaver) Install

func (s *Slaver) Install() (*v1.DaemonSet, error)

func (*Slaver) InstallIngress

func (s *Slaver) InstallIngress(domain string) error

func (*Slaver) InstallService

func (s *Slaver) InstallService() (*core_v1.Service, error)

func (*Slaver) MakeDir

func (s *Slaver) MakeDir(dir Dir) error

在 slaver 挂载的pvc 中创建目录

func (*Slaver) SendAll

func (s *Slaver) SendAll(request *pb.RouteRequest, retry bool) error

func (*Slaver) Uninstall

func (s *Slaver) Uninstall() error

func (*Slaver) UpdateIngress

func (s *Slaver) UpdateIngress(ingress *v1beta1.Ingress, domain string) error

Jump to

Keyboard shortcuts

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