|
|
@ -7,25 +7,25 @@ import (
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
const (
|
|
|
|
// DirectScheme stands for direct schema.
|
|
|
|
// DirectScheme stands for direct scheme.
|
|
|
|
DirectScheme = "direct"
|
|
|
|
DirectScheme = "direct"
|
|
|
|
// DiscovSchema stands for discov schema.
|
|
|
|
// DiscovScheme stands for discov scheme.
|
|
|
|
DiscovScheme = "discov"
|
|
|
|
DiscovScheme = "discov"
|
|
|
|
// EnpointSepChar is the separator cha in endpoints.
|
|
|
|
// EndpointSepChar is the separator cha in endpoints.
|
|
|
|
EndpointSepChar = ','
|
|
|
|
EndpointSepChar = ','
|
|
|
|
|
|
|
|
|
|
|
|
subsetSize = 32
|
|
|
|
subsetSize = 32
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
var (
|
|
|
|
var (
|
|
|
|
// EnpointSep is the separator string in endpoints.
|
|
|
|
// EndpointSep is the separator string in endpoints.
|
|
|
|
EndpointSep = fmt.Sprintf("%c", EndpointSepChar)
|
|
|
|
EndpointSep = fmt.Sprintf("%c", EndpointSepChar)
|
|
|
|
|
|
|
|
|
|
|
|
dirBuilder directBuilder
|
|
|
|
dirBuilder directBuilder
|
|
|
|
disBuilder discovBuilder
|
|
|
|
disBuilder discovBuilder
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// RegisterResolver registers the direct and discov schemas to the resolver.
|
|
|
|
// RegisterResolver registers the direct and discov schemes to the resolver.
|
|
|
|
func RegisterResolver() {
|
|
|
|
func RegisterResolver() {
|
|
|
|
resolver.Register(&dirBuilder)
|
|
|
|
resolver.Register(&dirBuilder)
|
|
|
|
resolver.Register(&disBuilder)
|
|
|
|
resolver.Register(&disBuilder)
|
|
|
|