sources

package
v0.0.0-...-07efe49 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NginxSource

type NginxSource struct {
	Engine *discovery.Engine
}

func (*NginxSource) Contexts

func (s *NginxSource) Contexts() []string

List of contexts that this source is capable of find items for. If the source supports all contexts the special value `AllContexts` ("*") should be used

func (*NginxSource) Find

func (s *NginxSource) Find(ctx context.Context, itemContext string) ([]*sdp.Item, error)

Find Not supported for this source

func (*NginxSource) Get

func (s *NginxSource) Get(ctx context.Context, itemContext string, query string) (*sdp.Item, error)

Get This method does not work for Nginx as there iosn't really any specific thing that differentiates one Nginx instance from another, the UniqueAttribute I'm using as the SHA1 hash of all of the server's confuration as this is all I could think of that would ensure that a server was unique

func (*NginxSource) Name

func (s *NginxSource) Name() string

Descriptive name for the source, used in logging and metadata

func (*NginxSource) Search

func (s *NginxSource) Search(ctx context.Context, itemContext string, query string) ([]*sdp.Item, error)

Search Looks for nginx instance in a given context. The query should be one of the following:

* `service-linux`: This looks for nginx on a linux server which has the nginx service running

func (*NginxSource) Type

func (s *NginxSource) Type() string

Type The type of items that this source is capable of finding

func (*NginxSource) Weight

func (s *NginxSource) Weight() int

Weight Returns the priority weighting of items returned by this source. This is used to resolve conflicts where two sources of the same type return an item for a GET request. In this instance only one item can be sen on, so the one with the higher weight value will win.

type NginxVersionInfo

type NginxVersionInfo struct {
	Version    string
	BuiltBy    string
	OpenSSL    string
	ConfigArgs []string
}

Jump to

Keyboard shortcuts

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