uptime

package
v1.5.66-0...-6af8381 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UptimeBucket = []byte("UptimeRecords")
)

Functions

func Run

func Run(ctx context.Context, logger *common.Logger) error

Types

type Config

type Config struct {
	Self       server.Peer
	Peers      []server.Peer
	ListenPort string
	Dir        string

	Env       string
	NodeType  string
	AudiusUrl string

	EthNetworkId       string
	EthTokenAddress    string
	EthRegistryAddress string
	EthProviderUrl     string
	EthOwnerWallet     string

	QueryProposalStartBlock string
	GqlUri                  string
	GqlBackupUri            string

	EntityManagerAddress string

	IdentityServiceEndpoint string

	WormholeContractAddress          string
	ClaimDistributionContractAddress string
	SolanaClusterEndpoint            string
	WAudioMintAddress                string
	UsdcMintAddress                  string
	SolanaTokenProgramAddress        string
	ClaimableTokenPda                string
	SolanaFeePayerAddress            string
	ClaimableTokenProgramAddress     string
	PaymentRouterProgramAddress      string
	RewardsManagerProgramId          string
	RewardsManagerProgramPda         string
	RewardsManagerTokenPda           string
	OptimizelySdkKey                 string
	DDEXKey                          string
}

type EnvResponse

type EnvResponse struct {
	Env       string `json:"env"`
	NodeType  string `json:"nodeType"`
	AudiusUrl string `json:"audiusUrl"`

	EthNetworkId       string `json:"ethNetworkId"`
	EthTokenAddress    string `json:"ethTokenAddress"`
	EthRegistryAddress string `json:"ethRegistryAddress"`
	EthProviderUrl     string `json:"ethProviderUrl"`
	EthOwnerWallet     string `json:"ethOwnerWallet"`

	QueryProposalStartBlock string `json:"queryProposalStartBlock"`
	GqlUri                  string `json:"gqlUri"`
	GqlBackupUri            string `json:"gqlBackupUri"`

	EntityManagerAddress string `json:"entityManagerAddress"`

	IdentityServiceEndpoint string `json:"identityServiceEndpoint"`

	WormholeContractAddress          string `json:"wormholeContractAddress"`
	ClaimDistributionContractAddress string `json:"claimDistributionContractAddress"`
	SolanaClusterEndpoint            string `json:"solanaClusterEndpoint"`
	WAudioMintAddress                string `json:"wAudioMintAddress"`
	UsdcMintAddress                  string `json:"usdcMintAddress"`
	SolanaTokenProgramAddress        string `json:"solanaTokenProgramAddress"`
	ClaimableTokenPda                string `json:"claimableTokenPda"`
	SolanaFeePayerAddress            string `json:"solanaFeePayerAddress"`
	ClaimableTokenProgramAddress     string `json:"claimableTokenProgramAddress"`
	RewardsManagerProgramId          string `json:"rewardsManagerProgramId"`
	RewardsManagerProgramPda         string `json:"rewardsManagerProgramPda"`
	RewardsManagerTokenPda           string `json:"rewardsManagerTokenPda"`
	OptimizelySdkKey                 string `json:"optimizelySdkKey"`
	DDEXKey                          string `json:"ddexKey"`
}

type Uptime

type Uptime struct {
	Config Config
	DB     *bbolt.DB
	// contains filtered or unexported fields
}

func New

func New(config Config) (*Uptime, error)

func (*Uptime) Start

func (u *Uptime) Start()

func (*Uptime) Stop

func (u *Uptime) Stop()

type UptimeResponse

type UptimeResponse struct {
	Host             string         `json:"host"`
	UptimePercentage float64        `json:"uptime_percentage"`
	Duration         string         `json:"duration"`
	UptimeHours      map[string]int `json:"uptime_raw_data"`
}

Jump to

Keyboard shortcuts

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