Documentation ¶
Overview ¶
Package registry provides a simple wrapper for building a Registry
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry interface { // NetworkServiceRegistryServer returns network service server NetworkServiceRegistryServer() registry.NetworkServiceRegistryServer // NetworkServiceRegistryServer returns network service endpoint server NetworkServiceEndpointRegistryServer() registry.NetworkServiceEndpointRegistryServer Register(s *grpc.Server) }
Registry - aggregates the APIs:
- registry.NetworkServiceRegistryServer
- registry.NetworkServiceEndpointRegistryServer
func NewServer ¶
func NewServer(nsChain registry.NetworkServiceRegistryServer, nseChain registry.NetworkServiceEndpointRegistryServer) Registry
NewServer creates new Registry with specific NetworkServiceRegistryServer and NetworkServiceEndpointRegistryServer functionality
Directories ¶
Path | Synopsis |
---|---|
chains
|
|
client
Package client provides common functions for building NS, NSE registry clients
|
Package client provides common functions for building NS, NSE registry clients |
memory
Package memory provides registry chain based on memory chain elements
|
Package memory provides registry chain based on memory chain elements |
proxydns
Package proxydns provides default chain for stateless proxy registries based on DNS
|
Package proxydns provides default chain for stateless proxy registries based on DNS |
common
|
|
authorize
Package authorize provides authz checks for incoming or returning connections.
|
Package authorize provides authz checks for incoming or returning connections. |
begin
Package begin provides a chain element that can be put at the beginning of the chain, after Connection.Id has been set but before any chain elements that would mutate the Connection on the return path.
|
Package begin provides a chain element that can be put at the beginning of the chain, after Connection.Id has been set but before any chain elements that would mutate the Connection on the return path. |
clientconn
Package clientconn - chain element for injecting a grpc.ClientConnInterface into the client chain
|
Package clientconn - chain element for injecting a grpc.ClientConnInterface into the client chain |
clientinfo
Package clientinfo provides a chain element that adds pod, node and cluster names to request
|
Package clientinfo provides a chain element that adds pod, node and cluster names to request |
clienturl
Package clienturl provides NS, NSE registry server chain elements that set client URL in context
|
Package clienturl provides NS, NSE registry server chain elements that set client URL in context |
clusterinfo
Package clusterinfo provides a chain element that appends clusterinfo labels into the request.
|
Package clusterinfo provides a chain element that appends clusterinfo labels into the request. |
connect
Package connect provides chain elements to 'connect' clients
|
Package connect provides chain elements to 'connect' clients |
dial
Package dial will dial up a grpc.ClientConnInterface if a client *url.URL is provided in the ctx, retrievable by clienturlctx.ClientURL(ctx) and put the resulting grpc.ClientConnInterface into the ctx using clientconn.Store(..) where it can be retrieved by other chain elements using clientconn.Load(...)
|
Package dial will dial up a grpc.ClientConnInterface if a client *url.URL is provided in the ctx, retrievable by clienturlctx.ClientURL(ctx) and put the resulting grpc.ClientConnInterface into the ctx using clientconn.Store(..) where it can be retrieved by other chain elements using clientconn.Load(...) |
dnsresolve
Package dnsresolve provides registry chain elements that can resolve passed Domain to URL
|
Package dnsresolve provides registry chain elements that can resolve passed Domain to URL |
endpointurls
Package endpointurls provides registry.NetworkServiceEndpointRegistryServer that can be injected in the chain of registry.NetworkServiceEndpointRegistryServer to get an actual nses of registry.NetworkServiceEndpoint URLs.
|
Package endpointurls provides registry.NetworkServiceEndpointRegistryServer that can be injected in the chain of registry.NetworkServiceEndpointRegistryServer to get an actual nses of registry.NetworkServiceEndpoint URLs. |
expire
Package expire provides registry server chain elements for unregistering expired endpoints, services
|
Package expire provides registry server chain elements for unregistering expired endpoints, services |
grpcmetadata
Package grpcmetadata provides chain elements that transfer grpc metadata between server and client.
|
Package grpcmetadata provides chain elements that transfer grpc metadata between server and client. |
heal
Package heal provides NS, NSE registry client chain elements for healing failed remote side
|
Package heal provides NS, NSE registry client chain elements for healing failed remote side |
interdomainbypass
Package interdomainbypass provides registry chain element that sets to outgoing NSE the public nsmgr-proxy and stores into the shared map the public nsmgr URL from the incoming endpoint.
|
Package interdomainbypass provides registry chain element that sets to outgoing NSE the public nsmgr-proxy and stores into the shared map the public nsmgr URL from the incoming endpoint. |
localbypass
Package localbypass implements a chain element to set NSMgr URL to endpoints on registration and set back endpoints URLs on find
|
Package localbypass implements a chain element to set NSMgr URL to endpoints on registration and set back endpoints URLs on find |
memory
Package memory provides NSM registry chain elements to building memory-based registries
|
Package memory provides NSM registry chain elements to building memory-based registries |
null
Package null provides simple registry chain elements that do nothing by call next and returns what comes back.
|
Package null provides simple registry chain elements that do nothing by call next and returns what comes back. |
querycache
Package querycache adds possible to cache Find queries
|
Package querycache adds possible to cache Find queries |
recvfd
Package recvfd provides an NSE registry server chain element that:
|
Package recvfd provides an NSE registry server chain element that: |
refresh
Package refresh provides registry elements for refreshing resources
|
Package refresh provides registry elements for refreshing resources |
retry
Package retry provides a chain element allowing to retry registration/search/de-registration
|
Package retry provides a chain element allowing to retry registration/search/de-registration |
sendfd
Package sendfd provides a registry.NetworkServiceEndpointRegistryClient chain element to convert any unix file socket endpoint.URLs into 'inode://${dev}/${ino}' urls and send the fd over the unix file socket.
|
Package sendfd provides a registry.NetworkServiceEndpointRegistryClient chain element to convert any unix file socket endpoint.URLs into 'inode://${dev}/${ino}' urls and send the fd over the unix file socket. |
setpayload
Package setpayload provides registry elements for setting ns.payload default
|
Package setpayload provides registry elements for setting ns.payload default |
setregistrationtime
Package setregistrationtime provides registry server chain elements for initial registration time setting
|
Package setregistrationtime provides registry server chain elements for initial registration time setting |
swapip
Package swapip allows to replace internal NSE address to external for register/unregister/find queries.
|
Package swapip allows to replace internal NSE address to external for register/unregister/find queries. |
updatepath
Package updatepath provides a chain element that sets the id of an incoming or outgoing request
|
Package updatepath provides a chain element that sets the id of an incoming or outgoing request |
core
|
|
adapters
Package adapters provide API to converting client to server and vise versa
|
Package adapters provide API to converting client to server and vise versa |
chain
Package chain provides API to make chains of registry elements
|
Package chain provides API to make chains of registry elements |
next
Package next provides a mechanism for chained registry.{Registry,Discovery}{Server,Client}s to call the next element in the chain.
|
Package next provides a mechanism for chained registry.{Registry,Discovery}{Server,Client}s to call the next element in the chain. |
streamchannel
Package streamchannel provides find client/servers based on channels
|
Package streamchannel provides find client/servers based on channels |
streamcontext
Package streamcontext provides API to extend context for find client/server
|
Package streamcontext provides API to extend context for find client/server |
trace
Package trace provides a wrapper for tracing around a registry.{Registry,Discovery}{Server,Client}
|
Package trace provides a wrapper for tracing around a registry.{Registry,Discovery}{Server,Client} |
Package switchcase provides chain elements acting like a switch-case statement, selecting a chain element with first succeed condition
|
Package switchcase provides chain elements acting like a switch-case statement, selecting a chain element with first succeed condition |
utils
|
|
checks/checkcontext
Package checkcontext - provides registry chain elements for checking the context.Context passed on by the previous chain element
|
Package checkcontext - provides registry chain elements for checking the context.Context passed on by the previous chain element |
checks/checknse
Package checknse - provides registry chain elements for checking the *registry.NetworkServiceEndpoint passed on by the previous chain element
|
Package checknse - provides registry chain elements for checking the *registry.NetworkServiceEndpoint passed on by the previous chain element |
count
Package count provides test registry chain elements for counting Register/Unregister/Find
|
Package count provides test registry chain elements for counting Register/Unregister/Find |
inject/injecterror
Package injecterror provides chain elements returning given error on Register, Unregister on given times
|
Package injecterror provides chain elements returning given error on Register, Unregister on given times |
inject/injectpeertoken
Package injectpeertoken provides chain elements that put peer token to gRPC metadata on Register and Unregister
|
Package injectpeertoken provides chain elements that put peer token to gRPC metadata on Register and Unregister |
Click to show internal directories.
Click to hide internal directories.