 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterMember ¶
type ClusterMember struct {
	ClusterMemberLocal
	Role                  string                `json:"role" yaml:"role"`
	SchemaInternalVersion uint64                `json:"schema_internal_version" yaml:"schema_internal_version"`
	SchemaExternalVersion uint64                `json:"schema_external_version" yaml:"schema_external_version"`
	LastHeartbeat         time.Time             `json:"last_heartbeat" yaml:"last_heartbeat"`
	Status                MemberStatus          `json:"status" yaml:"status"`
	Extensions            extensions.Extensions `json:"extensions" yaml:"extensions"`
	Secret                string                `json:"secret" yaml:"secret"`
}
    ClusterMember represents information about a dqlite cluster member.
type ClusterMemberLocal ¶
type ClusterMemberLocal struct {
	Name        string                `json:"name" yaml:"name"`
	Address     types.AddrPort        `json:"address" yaml:"address"`
	Certificate types.X509Certificate `json:"certificate" yaml:"certificate"`
}
    ClusterMemberLocal represents local information about a new cluster member.
type Control ¶
type Control struct {
	Bootstrap  bool              `json:"bootstrap" yaml:"bootstrap"`
	InitConfig map[string]string `json:"config" yaml:"config"`
	JoinToken  string            `json:"join_token" yaml:"join_token"`
	Address    types.AddrPort    `json:"address" yaml:"address"`
	Name       string            `json:"name" yaml:"name"`
}
    Control represents the arguments that can be used to initialize/shutdown the daemon.
type HeartbeatInfo ¶
type HeartbeatInfo struct {
	BeginRound        bool                     `json:"begin_round" yaml:"begin_round"`
	MaxSchemaInternal uint64                   `json:"max_schema_internal" yaml:"max_schema_internal"`
	MaxSchemaExternal uint64                   `json:"max_schema_external" yaml:"max_schema_external"`
	ClusterMembers    map[string]ClusterMember `json:"cluster_members" yaml:"cluster_members"`
}
    HeartbeatInfo represents information about the cluster sent out by the leader of the cluster to other members. If BeginRound is set, a new heartbeat will initiate.
type MemberStatus ¶
type MemberStatus string
MemberStatus represents the online status of a cluster member.
const ( // MemberOnline should be the MemberStatus when the node is online and reachable. MemberOnline MemberStatus = "ONLINE" // MemberUnreachable should be the MemberStatus when we were not able to connect to the node. MemberUnreachable MemberStatus = "UNREACHABLE" // MemberNotTrusted should be the MemberStatus when there is no local yaml entry for this node. MemberNotTrusted MemberStatus = "NOT TRUSTED" // MemberNotFound should be the MemberStatus when the node was not found in dqlite. MemberNotFound MemberStatus = "NOT FOUND" )
type SQLBatch ¶
type SQLBatch struct {
	Results []SQLResult
}
    SQLBatch represents a batch of SQL results.
type SQLDump ¶
type SQLDump struct {
	Text string `json:"text" yaml:"text"`
}
    SQLDump represents the text of a SQL dump.
type SQLQuery ¶
type SQLQuery struct {
	Query string `json:"query" yaml:"query"`
}
    SQLQuery represents a SQL query.
type SQLResult ¶
type SQLResult struct {
	Type         string          `json:"type" yaml:"type"`
	Columns      []string        `json:"columns" yaml:"columns"`
	Rows         [][]interface{} `json:"rows" yaml:"rows"`
	RowsAffected int64           `json:"rows_affected" yaml:"rows_affected"`
}
    SQLResult represents the result of executing a SQL command.
type Server ¶
type Server struct {
	Name    string         `json:"name"    yaml:"name"`
	Address types.AddrPort `json:"address" yaml:"address"`
	Ready   bool           `json:"ready"   yaml:"ready"`
}
    Server represents server status information.
type Token ¶
type Token struct {
	Secret        string           `json:"secret" yaml:"secret"`
	Fingerprint   string           `json:"fingerprint" yaml:"fingerprint"`
	JoinAddresses []types.AddrPort `json:"join_addresses" yaml:"join_addresses"`
}
    Token holds the information that is presented to the joining node when requesting a token.
func DecodeToken ¶
DecodeToken decodes a base64-encoded token string.
type TokenRecord ¶
type TokenRecord struct {
	Name  string `json:"name" yaml:"name"`
	Token string `json:"token" yaml:"token"`
}
    TokenRecord holds information for requesting a join token.
type TokenResponse ¶
type TokenResponse struct {
	ClusterCert    types.X509Certificate `json:"cluster_cert" yaml:"cluster_cert"`
	ClusterKey     string                `json:"cluster_key" yaml:"cluster_key"`
	ClusterMembers []ClusterMemberLocal  `json:"cluster_members" yaml:"cluster_members"`
}
    TokenResponse holds the information for connecting to a cluster by a node with a valid join token.