config

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package config provides the configuration for the application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificate

type Certificate struct {
	Name string `yaml:"name"`
	URL  string `yaml:"url"`
}

Certificate represents a certificate to check

type Docker

type Docker struct {
	Name       string   `yaml:"name"`
	URL        string   `yaml:"url"`
	Containers []string `yaml:"containers"` // required containers
}

Docker represents a docker container to check

type File

type File struct {
	Name string `yaml:"name"`
	Path string `yaml:"path"`
}

File represents a file to check

type HTTP

type HTTP struct {
	Name string `yaml:"name"`
	URL  string `yaml:"url"`
}

HTTP represents a http service to check

type Mongo

type Mongo struct {
	Name          string        `yaml:"name"`
	URL           string        `yaml:"url"`
	OplogMaxDelta time.Duration `yaml:"oplog_max_delta"`
	Collection    string        `yaml:"collection"`
	DB            string        `yaml:"db"`
	CountQuery    string        `yaml:"count_query"`
}

Mongo represents a mongo service to check

type Nginx

type Nginx struct {
	Name      string `yaml:"name"`
	StatusURL string `yaml:"status_url"`
}

Nginx represents a nginx service to check

type Parameters

type Parameters struct {
	Volumes  []Volume `yaml:"volumes"`
	Services struct {
		HTTP        []HTTP        `yaml:"http"`
		Certificate []Certificate `yaml:"certificate"`
		File        []File        `yaml:"file"`
		Mongo       []Mongo       `yaml:"mongo"`
		Nginx       []Nginx       `yaml:"nginx"`
		Program     []Program     `yaml:"program"`
		Docker      []Docker      `yaml:"docker"`
		RMQ         []RMQ         `yaml:"rmq"`
	} `yaml:"services"`
	// contains filtered or unexported fields
}

Parameters represents the whole configuration parameters

func New

func New(fname string) (*Parameters, error)

New creates a new Parameters from the given file

func (*Parameters) MarshalServices

func (p *Parameters) MarshalServices() []string

MarshalServices returns the services as a list of strings with the format used by command line

func (*Parameters) MarshalVolumes

func (p *Parameters) MarshalVolumes() []string

MarshalVolumes returns the volumes as a list of strings with the format "name:path"

func (*Parameters) String

func (p *Parameters) String() string

type Program

type Program struct {
	Name string   `yaml:"name"`
	Path string   `yaml:"path"`
	Args []string `yaml:"args"`
}

Program represents a program to check

type RMQ

type RMQ struct {
	Name  string `yaml:"name"`
	URL   string `yaml:"url"`
	User  string `yaml:"user"`
	Pass  string `yaml:"pass"`
	Vhost string `yaml:"vhost"`
	Queue string `yaml:"queue"`
}

RMQ represents a rmq to check

type Volume

type Volume struct {
	Name string `yaml:"name"`
	Path string `yaml:"path"`
}

Volume represents a volumes to check

Jump to

Keyboard shortcuts

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