Skip to content

Faro Library v1.2.0

Choose a tag to compare

@github-actions github-actions released this 13 Sep 19:59
· 96 commits to main since this release

Faro Kubernetes Resource Monitoring Library v1.2.0

A lightweight Go library for monitoring Kubernetes resource changes with server-side filtering.

Installation

go get github.com/T0MASD/faro@v1.2.0

Quick Start

package main

import (
    "context"
    "github.com/T0MASD/faro/pkg"
)

func main() {
    // Create Kubernetes client
    client, err := faro.NewKubernetesClient()
    if err != nil {
        panic(err)
    }
    
    // Create logger
    logger, err := faro.NewLogger("./logs")
    if err != nil {
        panic(err)
    }
    defer logger.Shutdown()
    
    // Load configuration
    config, err := faro.LoadConfig()
    if err != nil {
        panic(err)
    }
    
    // Create and start controller
    controller := faro.NewController(client, logger, config)
    ctx := context.Background()
    
    // Set readiness callback (optional)
    controller.SetReadyCallback(func() {
        logger.Info("main", "Faro is ready")
    })
    
    // Start monitoring
    if err := controller.Start(ctx); err != nil {
        logger.Error("main", "Controller error: " + err.Error())
    }
}

Changelog

  • 423c0d1: The license badge now correctly points to the Unlicense (https://unlicense.org/) which matches the UNLICENSE file that already exists in your repository. This change makes the README consistent with your project's actual license. (@T0MASD)
  • 6539029: feat: controller optimizations, enhanced testing, and CI improvements (@T0MASD)
  • 8cf3ea4: fix: correct test_import.go generation in release workflow (@T0MASD)
  • fbde450: workload monitor updates (@T0MASD)

Documentation

Examples

Full Changelog: v1.1.0...v1.2.0