nodeevents

package
v1.67.2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB interface {
	// Insert a node event into the node events table.
	Insert(ctx context.Context, email string, nodeID storj.NodeID, event Type) (nodeEvent NodeEvent, err error)
	// GetLatestByEmailAndEvent gets latest node event by email and event type.
	GetLatestByEmailAndEvent(ctx context.Context, email string, event Type) (nodeEvent NodeEvent, err error)
}

DB implements the database for node events.

architecture: Database

type NodeEvent

type NodeEvent struct {
	ID        uuid.UUID
	Email     string
	NodeID    storj.NodeID
	Event     Type
	CreatedAt time.Time
	EmailSent *time.Time
}

NodeEvent contains information needed to notify a node operator about something that happened to a node.

type Type

type Type int

Type is a type of node event.

const (
	// Online indicates that the node has come back online.
	Online Type = iota
	// Offline indicates that the node is offline.
	Offline
	// Disqualified indicates that the node is disqualified.
	Disqualified
	// UnknownAuditSuspended indicates that the node is suspended for unknown audit errors.
	UnknownAuditSuspended
	// UnknownAuditUnsuspended indicates that the node is no longer suspended for unknown audit errors.
	UnknownAuditUnsuspended
	// OfflineSuspended indicates that the node is suspended for being offline.
	OfflineSuspended
	// OfflineUnsuspended indicates that the node is no longer suspended for being offline.
	OfflineUnsuspended
	// BelowMinVersion indicates that the node's software is below the minimum version.
	BelowMinVersion
)

Jump to

Keyboard shortcuts

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