service

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2019 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package service defines a service for the Yamux stream multiplexer.

For more information about Yamux, see:

https://github.com/hashicorp/yamux

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// AcceptBacklog is the size of the accept backlog.
	AcceptBacklog int `toml:"accept_backlog" comment:"The size of the accept backlog."`

	// ConnectionWriteTimeout is the connection write timeout.
	ConnectionWriteTimeout string `toml:"connection_write_timeout" comment:"The connection write timeout."`

	// KeepAliveInterval is the keep alive interval.
	KeepAliveInterval string `toml:"keep_alive_interval" comment:"The keep alive interval."`

	// MaxStreamWindowSize is the maximum stream window size.
	MaxStreamWindowSize string `toml:"max_stream_window_size" comment:"The maximum stream window size."`
}

Config contains configuration options for the Yamux service.

type Service

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

Service is the Yamux service.

func (*Service) Config

func (s *Service) Config() interface{}

Config returns the current service configuration or creates one with good default values.

func (*Service) Desc

func (s *Service) Desc() string

Desc returns a description of what the service does.

func (*Service) Expose

func (s *Service) Expose() interface{}

Expose exposes the stream muxer to other services.

It exposes the type:

github.com/libp2p/go-stream-muxer.Transport

func (*Service) ID

func (s *Service) ID() string

ID returns the unique identifier of the service.

func (*Service) Name

func (s *Service) Name() string

Name returns the human friendly name of the service.

func (*Service) SetConfig

func (s *Service) SetConfig(config interface{}) error

SetConfig configures the service.

Jump to

Keyboard shortcuts

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