broadcast

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UseBroadcast added in v0.0.3

func UseBroadcast(ctx context.Context) (context.Context, <-chan Response)

UseBroadcast activates broadcasting for an RPC call, returning a context and a channel to receive the responses.

Types

type ClusterBuilder

type ClusterBuilder struct {
	// contains filtered or unexported fields
}

ClusterBuilder struct for building client interceptors with distributed service discovery.

func NewClusterBuilder

func NewClusterBuilder(registry registry.Registry, service string, dialOptions ...grpc.DialOption) *ClusterBuilder

NewClusterBuilder creates a new ClusterBuilder instance.

func (*ClusterBuilder) BuildUnaryInterceptor

func (b *ClusterBuilder) BuildUnaryInterceptor() grpc.UnaryClientInterceptor

BuildUnaryInterceptor constructs a unary client interceptor for broadcasting RPCs across instances.

type Response added in v0.0.3

type Response struct {
	Error error
	Reply interface{}
}

Response structure for holding either a reply or an error.

Jump to

Keyboard shortcuts

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