reframeserver

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: Apache-2.0, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*options) error

Option captures a configurable parameter in admin HTTP server.

func WithListenAddr

func WithListenAddr(addr string) Option

WithListenAddr sets the net address on which the reframe HTTP server is exposed.

func WithReadTimeout

func WithReadTimeout(t time.Duration) Option

WithReadTimeout set s the HTTP read timeout. If unset, the default of 30 seconds is used.

func WithWriteTimeout

func WithWriteTimeout(t time.Duration) Option

WithWriteTimeout sets the HTTP write timeout. If unset, the default of 30 seconds is used.

type Server

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

func New

func New(cidTtl time.Duration,
	chunkSize int,
	snapshotSize int,
	providerID string,
	addrs []string,
	e provider.Interface,
	ds datastore.Batching,
	o ...Option) (*Server, error)

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

func (*Server) Start

func (s *Server) Start() error

Jump to

Keyboard shortcuts

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