raftgrpc

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package raftgrpc implements gRPC transportation layer for raft.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(opts ...Option)

Register registers the gRPC for use with all clients and servers communication.

NOTE: this function must only be called during initialization time (i.e. in an init() function), and is not thread-safe.

func RegisterHandler

func RegisterHandler(s *grpc.Server, h transport.Handler)

RegisterHandler registers transport handler and its implementation to the gRPC server.

Types

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option configures grpc using the functional options paradigm popularized by Rob Pike and Dave Cheney. If you're unfamiliar with this style, see https://commandcenter.blogspot.com/2014/01/self-referential-functions-and-design.html and https://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis.

func WithCallOptions

func WithCallOptions(opts ...grpc.CallOption) Option

WithCallOptions configures grpc client call from the given options.

func WithDialOptions

func WithDialOptions(opts ...grpc.DialOption) Option

WithDialOptions configures grpc dial from the given options.

Jump to

Keyboard shortcuts

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