oracle-watchdog

agent

import "github.com/afreidah/oracle-watchdog/internal/agent"

Index

type Agent

Agent monitors Oracle nodes and restarts unresponsive instances.

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

func New

func New(cfg *config.Config) *Agent

New creates an Agent with the given configuration. Connections to Consul and OCI happen asynchronously in Run().

func (*Agent) Run

func (a *Agent) Run(ctx context.Context) error

Run starts the monitoring loop. Never returns an error due to connection issues - continuously retries and emits metrics. Only returns on context cancellation. When wan_dns is enabled in config, the Updater runs as a sibling goroutine sharing the same context lifetime.

Generated by gomarkdoc