server

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 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 WithAdFlushFrequency added in v0.13.1

func WithAdFlushFrequency(t time.Duration) Option

WithAdFlushFrequency sets the frequency at which the current chunk is publihsed even if it's not full

func WithListenAddr

func WithListenAddr(addr string) Option

WithListenAddr sets the net address on which the delegated routing 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,
	pageSize 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