opensvc

package
v2.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2020 License: GPL-3.0 Imports: 14 Imported by: 1

Documentation

Overview

replication-manager - Replication Manager Monitoring and CLI for MariaDB and MySQL Copyright 2017 Signal 18 SARL Authors: Guillaume Lefranc <guillaume@signal18.io>

Stephane Varoqui  <svaroqui@gmail.com>

This source code is licensed under the GNU General Public License, version 3.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Id     int    `json:"id"`
	Status string `json:"status"`
	Stderr string `json:"stderr"`
}

type Addr

type Addr struct {
	Addr          string `json:"addr"`
	Addr_type     string `json:"addr_type"`
	Mask          string `json:"mask"`
	Net_broadcast string `json:"net_broadcast"`
	Net_gateway   string `json:"net_gateway"`
	Net_name      string `json:"net_name"`
	Net_network   string `json:"net_network"`
	Net_intf      string `json:"intf"`
}

type Collector

type Collector struct {
	Host                        string
	Port                        string
	User                        string
	Pass                        string
	RplMgrUser                  string
	RplMgrPassword              string
	RplMgrCodeApp               string
	ProvAgents                  string
	ProvMem                     string
	ProvIops                    string
	ProvTags                    string
	ProvDisk                    string
	ProvPwd                     string
	ProvNetMask                 string
	ProvNetGateway              string
	ProvNetIface                string
	ProvMicroSrv                string
	ProvFSType                  string
	ProvFSPool                  string
	ProvFSMode                  string
	ProvFSPath                  string
	ProvDockerImg               string
	ProvProxAgents              string
	ProvProxDisk                string
	ProvProxNetMask             string
	ProvProxNetGateway          string
	ProvProxNetIface            string
	ProvProxMicroSrv            string
	ProvProxFSType              string
	ProvProxFSPool              string
	ProvProxFSMode              string
	ProvProxFSPath              string
	ProvProxDockerMaxscaleImg   string
	ProvProxDockerHaproxyImg    string
	ProvProxDockerProxysqlImg   string
	ProvProxDockerShardproxyImg string
	ProvProxTags                string
	ProvCores                   string
	Verbose                     int
}

func (*Collector) Bootstrap

func (collector *Collector) Bootstrap(path string) error

func (*Collector) CreateAppCode

func (collector *Collector) CreateAppCode(code string) (int, error)

func (*Collector) CreateMRMGroup

func (collector *Collector) CreateMRMGroup() (int, error)

func (*Collector) CreateMRMUser

func (collector *Collector) CreateMRMUser(user string, password string) (int, error)

func (*Collector) CreateService

func (collector *Collector) CreateService(service string, app string) (string, error)

func (*Collector) CreateTag

func (collector *Collector) CreateTag(tag string) (string, error)

func (*Collector) CreateTemplate

func (collector *Collector) CreateTemplate(name string, template string) (int, error)

CreateTemplate post a template to the collector

func (*Collector) DeleteService

func (collector *Collector) DeleteService(serviceid string) (string, error)

func (*Collector) DeteteServiceTags

func (collector *Collector) DeteteServiceTags(idSrv string) error

func (*Collector) GetAction

func (collector *Collector) GetAction(actionid string) *Action

func (*Collector) GetActionStatus

func (collector *Collector) GetActionStatus(actionid string) string

cycle W -> R -> T

func (*Collector) GetGroupIdFromName

func (collector *Collector) GetGroupIdFromName(group string) (string, error)

func (*Collector) GetGroups

func (collector *Collector) GetGroups() ([]Group, error)

func (*Collector) GetNodes

func (collector *Collector) GetNodes() []Host

func (*Collector) GetRuleset

func (collector *Collector) GetRuleset(RulesetName string) ([]Ruleset, error)

func (*Collector) GetRulesetVariable

func (collector *Collector) GetRulesetVariable(RulesetId int, VariableName string) ([]RulesetVariable, error)

func (*Collector) GetServiceFromName

func (collector *Collector) GetServiceFromName(name string) (Service, error)

func (*Collector) GetServiceStatus

func (collector *Collector) GetServiceStatus(name string) (int, error)

GetServiceStatus 0 not provision, 1 prov and up , 2 prov & not up

func (*Collector) GetServiceTags

func (collector *Collector) GetServiceTags(idSrv string) ([]Tag, error)

func (*Collector) GetServices

func (collector *Collector) GetServices() ([]Service, error)

func (*Collector) GetTagIdFromTags

func (collector *Collector) GetTagIdFromTags(tags []Tag, name string) (string, error)

func (*Collector) GetTags

func (collector *Collector) GetTags() ([]Tag, error)

func (*Collector) ImportCompliance

func (collector *Collector) ImportCompliance(path string) (string, error)

func (*Collector) ImportForms

func (collector *Collector) ImportForms(path string) (string, error)

Dead code

func (*Collector) PostSafe

func (collector *Collector) PostSafe(filename string) (string, error)

func (*Collector) ProvisionTemplate

func (collector *Collector) ProvisionTemplate(id int, nodeid string, name string) (int, error)

func (*Collector) PublishSafe

func (collector *Collector) PublishSafe(safeUUID string, group string) error

func (*Collector) SetAppCodePublication

func (collector *Collector) SetAppCodePublication(appid int, groupid int) (string, error)

func (*Collector) SetAppCodeResponsible

func (collector *Collector) SetAppCodeResponsible(appid int, groupid int) (string, error)

func (*Collector) SetGroupUser

func (collector *Collector) SetGroupUser(groupid int, userid int) (string, error)

func (*Collector) SetPrimaryGroup

func (collector *Collector) SetPrimaryGroup(groupid int, userid int) (string, error)

func (*Collector) SetRulesetVariableValue

func (collector *Collector) SetRulesetVariableValue(RulesetName string, VariableName string, Content string) (string, error)

func (*Collector) SetServiceTag

func (collector *Collector) SetServiceTag(tag_id string, service_id string) (string, error)

func (*Collector) StartService

func (collector *Collector) StartService(nodeid string, serviceid string) (string, error)

func (*Collector) StopService

func (collector *Collector) StopService(nodeid string, serviceid string) (string, error)

func (*Collector) UnprovisionService

func (collector *Collector) UnprovisionService(nodeid string, serviceid string) (int, error)

type Group

type Group struct {
	Id int `json:"id"`
}

type Host

type Host struct {
	Id        int    `json:"id"`
	Node_id   string `json:"node_id"`
	Node_name string `json:"nodename"`
	Cpu_cores int    `json:"cpu_cores"`
	Cpu_freq  int    `json:"cpu_freq"`
	Mem_bytes int    `json:"mem_bytes"`
	Os_kernel string `json:"os_kernel"`
	Os_name   string `json:"os_name"`
	Ips       []Addr
	Svc       []Service
}

type HostList

type HostList []*Host

type Ruleset

type Ruleset struct {
	Id int `json:"id"`
}

type RulesetVariable

type RulesetVariable struct {
	Id int `json:"id"`
}

type Service

type Service struct {
	Id         int    `json:"id"`
	Svc_name   string `json:"svcname"`
	Svc_status string `json:"svc_status"`
	Updated    string `json:"updated"`
	Svc_id     string `json:"svc_id"`
}

type Tag

type Tag struct {
	Tag_name string `json:"tag_name"`
	Tag_id   string `json:"tag_id"`
}

Jump to

Keyboard shortcuts

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