redis

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PODSTORE = iota
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a redis client that also holds the value for max log enteries to hold for each pod

func NewClient

func NewClient(host, port, username, password string, db int, maxEntries int64) *Client

func (*Client) ActiveIncidentExists

func (c *Client) ActiveIncidentExists(ctx context.Context, releaseName, namespace string) (bool, error)

func (*Client) AddEventToIncident

func (c *Client) AddEventToIncident(ctx context.Context, incidentID string, event *models.PodEvent, newIncident bool) error

func (*Client) AddLogs

func (c *Client) AddLogs(ctx context.Context, incidentID, strLogs string) (string, error)

func (*Client) AppendToNotifyWorkQueue

func (c *Client) AppendToNotifyWorkQueue(ctx context.Context, packed []byte) error

func (*Client) CreateActiveIncident

func (c *Client) CreateActiveIncident(ctx context.Context, releaseName, namespace string) (string, error)

func (*Client) DuplicateLogs

func (c *Client) DuplicateLogs(ctx context.Context, incidentID, strLogs string) (bool, error)

func (*Client) GetActiveIncident

func (c *Client) GetActiveIncident(ctx context.Context, releaseName, namespace string) (string, error)

func (*Client) GetAgentCreationTimestamp

func (c *Client) GetAgentCreationTimestamp(ctx context.Context) (int64, error)

func (*Client) GetAllActiveIncidents added in v1.4.0

func (c *Client) GetAllActiveIncidents(ctx context.Context) ([]string, error)

func (*Client) GetAllIncidents

func (c *Client) GetAllIncidents(ctx context.Context) ([]string, error)

func (*Client) GetIncidentDetails

func (c *Client) GetIncidentDetails(ctx context.Context, incidentID string) (*models.Incident, error)

func (*Client) GetIncidentEventsByID

func (c *Client) GetIncidentEventsByID(ctx context.Context, incidentID string) ([]*models.PodEvent, error)

func (*Client) GetIncidentsByReleaseNamespace

func (c *Client) GetIncidentsByReleaseNamespace(ctx context.Context, releaseName, namespace string) ([]string, error)

func (*Client) GetItemFromPendingQueue

func (c *Client) GetItemFromPendingQueue(ctx context.Context) ([]byte, float64, error)

func (*Client) GetLatestEventForIncident

func (c *Client) GetLatestEventForIncident(ctx context.Context, incidentID string) (*models.PodEvent, error)

func (*Client) GetLogs

func (c *Client) GetLogs(ctx context.Context, logID string) (string, error)

func (*Client) GetPodsForIncident added in v1.4.0

func (c *Client) GetPodsForIncident(ctx context.Context, incidentID string) ([]string, error)

func (*Client) IncidentExists

func (c *Client) IncidentExists(ctx context.Context, incident string) (bool, error)

func (*Client) IsFirstRun

func (c *Client) IsFirstRun(ctx context.Context) (bool, error)

func (*Client) IsIncidentResolved

func (c *Client) IsIncidentResolved(ctx context.Context, incidentID string) (bool, error)

func (*Client) RequeueItemWithScore

func (c *Client) RequeueItemWithScore(ctx context.Context, packed []byte, score float64) error

func (*Client) SetAgentCreationTimestamp

func (c *Client) SetAgentCreationTimestamp(ctx context.Context) error

func (*Client) SetJobIncidentResolved

func (c *Client) SetJobIncidentResolved(ctx context.Context, incidentID string) error

func (*Client) SetPodResolved

func (c *Client) SetPodResolved(ctx context.Context, podName, incidentID string) error

Jump to

Keyboard shortcuts

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