Documentation
¶
Overview ¶
Package multicast - implementation of multicast address resolver. We use
grpc.Dial("tcp://127.0.0.1:1234", opts...)
directly to connect to a single target. If we want to connect to more than one target we can use this package and write code like:
grpc.Dial("multicast://127.0.0.1:1234,127.0.0.1:1235")
all use the Dial function in this package like:
multicast.Dail([]string{"127.0.0.1:1234","127.0.0.1:1235"}, opts...)
Caution: we should import multicast package before we prepare to use the multicast resolver.
Index ¶
Constants ¶
View Source
const (
Scheme = "multicast"
)
View Source
const (
Separator = ","
)
Variables ¶
This section is empty.
Functions ¶
func Dial ¶ added in v0.0.6
func Dial(endpoints []string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
Dial
Connect to given targets listed in arguments endpoints. See doc.go for more information.
Types ¶
type Builder ¶ added in v0.0.7
type Builder struct{}
Builder
The builder of multicast resolver.
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver
A resolver to resolve multi targets connections.
func (*Resolver) Close ¶
func (r *Resolver) Close()
Close
See the interface description for more information.
func (*Resolver) ResolveNow ¶
func (r *Resolver) ResolveNow(_ resolver.ResolveNowOptions)
ResolveNow
See the interface description for more information.
Click to show internal directories.
Click to hide internal directories.