multicast

package
v0.0.33 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

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.

func (*Builder) Build added in v0.0.7

Build

See description of the interface.

func (*Builder) Scheme added in v0.0.7

func (t *Builder) Scheme() string

Scheme

See description of the interface.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL