Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewResolver ¶
func NewResolver(logger logger.Logger) nameresolution.Resolver
NewResolver creates the instance of mDNS name resolver.
Types ¶
type Resolver ¶ added in v1.7.0
type Resolver struct {
// contains filtered or unexported fields
}
func (*Resolver) Close ¶ added in v1.7.0
Close is not formally part of the name resolution interface as proposed in https://github.com/dapr/components-contrib/issues/1472 but this is used in the tests to clean up the mDNS registration.
func (*Resolver) ResolveID ¶ added in v1.7.0
func (m *Resolver) ResolveID(parentCtx context.Context, req nameresolution.ResolveRequest) (string, error)
ResolveID resolves name to address via mDNS.
type Subscriber ¶ added in v1.7.0
func NewSubscriber ¶ added in v1.7.0
func NewSubscriber() Subscriber
func (*Subscriber) Close ¶ added in v1.7.0
func (s *Subscriber) Close()
type SubscriberPool ¶ added in v1.7.0
type SubscriberPool struct { Once *sync.Once Subscribers []Subscriber }
SubscriberPool is used to manage a pool of subscribers for a given app id. 'Once' belongs to the first subscriber as it is their responsibility to fetch the address associated with the app id and publish it to the other subscribers. WARN: pools are not thread safe and intended to be accessed only when using subMu lock.
func NewSubscriberPool ¶ added in v1.7.0
func NewSubscriberPool(w Subscriber) *SubscriberPool
func (*SubscriberPool) Add ¶ added in v1.7.0
func (p *SubscriberPool) Add(sub Subscriber)
Click to show internal directories.
Click to hide internal directories.