Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
LeaderNotFoundError = fmt.Errorf("service leader not found")
)
View Source
var StopChan = make(chan struct{})
Functions ¶
func InitPlayBackTLSConfig ¶ added in v3.6.0
func StopAgent ¶
func StopAgent(req *pb.StopAgentRequest) error
Types ¶
type MetaConfig ¶
type MetaConfig struct { GitInfoSHA string HBInterval int MetaAddr *nebula.HostAddr // meta service address to connect AgentAddr *nebula.HostAddr // info to be reported to the meta service TLSConfig *tls.Config }
func NewMetaConfig ¶
type NebulaMeta ¶
type NebulaMeta struct {
// contains filtered or unexported fields
}
NebulaMeta is the client to communicate with nebula meta servie, such as heartbeat\getMetaInfo. Through which, the agent could get services to monitor dynamically
func NewMeta ¶
func NewMeta(config *MetaConfig) (*NebulaMeta, error)
type PlayBackTLSConfig ¶ added in v3.6.0
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service keeps the metad/storaged/graphd's role name and root dir which should have scripts to start/stop service
func FromStartReq ¶
func FromStartReq(req *pb.StartServiceRequest) *Service
func FromStatusReq ¶
func FromStatusReq(req *pb.ServiceStatusRequest) *Service
func FromStopReq ¶
func FromStopReq(req *pb.StopServiceRequest) *Service
type ServiceDaemon ¶
type ServiceDaemon struct {
// contains filtered or unexported fields
}
ServiceDaemon will start/stop metad/storaged/graphd in the service machine through scripts providing by the nebula
func NewDaemon ¶
func NewDaemon(s *Service) (*ServiceDaemon, error)
func (*ServiceDaemon) Start ¶
func (d *ServiceDaemon) Start() error
TODO(spw): The code will only check the scripts return code. And when return code is 0, it does not mean the service has must been started successfully. Then we need to check the service process status by other means in the future
func (*ServiceDaemon) Stop ¶
func (d *ServiceDaemon) Stop() error
type ServiceName ¶
type ServiceName string
const ( ServiceName_Metad ServiceName = "metad" ServiceName_Storaged ServiceName = "storaged" ServiceName_Graphd ServiceName = "graphd" ServiceName_Unknown ServiceName = "unknown" )
type ServicePlayBack ¶
type ServicePlayBack struct {
// contains filtered or unexported fields
}
func NewPlayBack ¶
func NewPlayBack(req *pb.DataPlayBackRequest) *ServicePlayBack
func (*ServicePlayBack) PlayBack ¶
func (p *ServicePlayBack) PlayBack() error
type SpaceUsage ¶ added in v3.6.1
type SpaceUsage struct {
DataPath string
}
func NewSpaceUsage ¶ added in v3.6.1
func NewSpaceUsage(dataPath string) *SpaceUsage
func (*SpaceUsage) GetSpaceUsages ¶ added in v3.6.1
func (s *SpaceUsage) GetSpaceUsages() (*pb.GetSpaceUsagesResponse, error)
Click to show internal directories.
Click to hide internal directories.