Documentation
¶
Overview ¶
Package servers is the set of Technitium servers one technitium-mcp process works on, each under a short name of the operator's choosing. The tools take that name to say which server a call is about, and "all" to ask every one and set the answers side by side - which is the point of holding several: two servers meant to agree are only seen to disagree when both are asked.
Index ¶
Constants ¶
const ( // All is the name that asks for every server. All = "all" // Default is the name of a single server given without one. Default = "default" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// Name is what the operator called it: ns1, ns2
Name string
Client *technitium.Client
}
Server is one configured server.
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
Set is the configured servers, in the order given.
func New ¶
func New(serverSettings, tokenSettings []string, opts ...technitium.Option) (*Set, error)
New builds the set from the server and token settings as given: each a list whose entries may themselves hold several joined by commas, as a flag given twice and an environment variable both arrive.
A server is name=url; a single server may be a url alone, and is then called default. A token is name=token for the server of that name, or a token alone for every server given none of its own.
Every server's client is made with the options given: a logger for its traffic, say.