status

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const JsonIdent = "    "

Variables

This section is empty.

Functions

This section is empty.

Types

type CNInstance

type CNInstance struct {
	UUID      string
	TxnClient client.TxnClient
}

type CNStatus

type CNStatus struct {
	UUID            string          `json:"uuid"`
	TxnClientStatus TxnClientStatus `json:"txn_client_status"`
}

type DeletedSession

type DeletedSession struct {
	Address   string    `json:"address"`
	DeletedAt time.Time `json:"deleted_at"`
}

type HAKeeperStatus

type HAKeeperStatus struct {
	Nodes        []NodeStatus `json:"nodes"`
	DeletedNodes []NodeStatus `json:"deleted_nodes"`
	ErrMsg       string       `json:"err_msg"`
}

HAKeeperStatus contains the status of HAKeeper. Currently, we focus on the uptime/downtime of nodes in HAKeeper.

type LogtailServerStatus

type LogtailServerStatus struct {
	Sessions        []SessionStatus  `json:"session_status"`
	DeletedSessions []DeletedSession `json:"deleted_sessions"`
}

type NodeStatus

type NodeStatus struct {
	NodeID    string                        `json:"node_id"`
	NodeType  string                        `json:"node_type"`
	Address   string                        `json:"address"`
	Labels    map[string]metadata.LabelList `json:"Labels"`
	WorkState metadata.WorkState            `json:"WorkState"`
	Resource  pb.Resource                   `json:"Resource"`
	UpTime    time.Time                     `json:"up_time"`
	DownTime  time.Time                     `json:"down_time"`
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer() *Server

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, _ *http.Request)

func (*Server) SetHAKeeperClient

func (s *Server) SetHAKeeperClient(c logservice.ClusterHAKeeperClient)

func (*Server) SetLogtailServer

func (s *Server) SetLogtailServer(logtailServer *service.LogtailServer)

func (*Server) SetTxnClient

func (s *Server) SetTxnClient(uuid string, c client.TxnClient)

type SessionStatus

type SessionStatus struct {
	ClientAddress    string    `json:"client_address"`
	LastBeforeSend   time.Time `json:"last_before_send"`
	LastAfterSend    time.Time `json:"last_after_send"`
	Active           int       `json:"active"`
	TableStatusCount int       `json:"table_status_count"`
}

type Status

type Status struct {
	LogtailServerStatus LogtailServerStatus `json:"logtail_server_status"`
	HAKeeperStatus      HAKeeperStatus      `json:"hakeeper_status"`
	CNStatus            []CNStatus          `json:"cn_status"`
}

type TxnClientStatus

type TxnClientStatus struct {
	// indicate whether the CN can provide service normally.
	// 0 means paused, 1 means normal.
	State int
	// number of user active transactions.
	UserTxnNum int
	// all active txns
	ActiveTxns     []string
	ActiveTxnCount int
	// FIFO queue for ready to active txn
	WaitActiveTxns     []string
	WaitActiveTxnCount int
	// LatestTS is the latest TS for the txn client.
	LatestTS timestamp.Timestamp
}

Jump to

Keyboard shortcuts

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