Documentation ¶
Index ¶
- type NginxSource
- func (s *NginxSource) Contexts() []string
- func (s *NginxSource) Find(ctx context.Context, itemContext string) ([]*sdp.Item, error)
- func (s *NginxSource) Get(ctx context.Context, itemContext string, query string) (*sdp.Item, error)
- func (s *NginxSource) Name() string
- func (s *NginxSource) Search(ctx context.Context, itemContext string, query string) ([]*sdp.Item, error)
- func (s *NginxSource) Type() string
- func (s *NginxSource) Weight() int
- type NginxVersionInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NginxSource ¶
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 ¶
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.