streamlayer

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package streamlayer contains the Raft stream layer implementation.

Index

Constants

View Source
const (
	ListenAddressEnvVar = "STORE_STREAM_LAYER_LISTEN_ADDRESS"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// ListenAddress is the address to listen on.
	ListenAddress string `yaml:"listen-address,omitempty" json:"listen-address,omitempty" toml:"listen-address,omitempty"`
}

Options are the StreamLayer options.

func NewOptions

func NewOptions() *Options

NewOptions returns new StreamLayerOptions with sensible defaults.

func (*Options) BindFlags

func (o *Options) BindFlags(fs *flag.FlagSet)

BindFlags binds the StreamLayer options to the given flag set.

func (*Options) Validate

func (o *Options) Validate() error

Validate validates the StreamLayer options.

type StreamLayer

type StreamLayer interface {
	raft.StreamLayer
	// ListenPort returns the port the transport is listening on.
	ListenPort() int
}

StreamLayer is the StreamLayer interface.

func New

func New(opts *Options) (StreamLayer, error)

New creates a new stream layer with the given options.

Jump to

Keyboard shortcuts

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