ctmonitor

package
v0.0.0-...-8a6b13c Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RHURecordSize = 21
	RHUHashSize   = 16
	// Sunlight defines index size to be 40 bits or 5 bytes
	RHULeafIndexSize = 5
)

TODO: refactor the duplicate definitions of this stanza in this file and bucket.go to be in the sunlight package.

Variables

This section is empty.

Functions

func FastlyServe

func FastlyServe(ctx context.Context, w fsthttp.ResponseWriter, r *fsthttp.Request)

func FastlyWrapper

func FastlyWrapper(wrapped func(ctx context.Context, reqBody io.ReadCloser, query url.Values) (resp []byte, code int, err error)) func(c context.Context, w fsthttp.ResponseWriter, r *fsthttp.Request)

func MainMain

func MainMain(listener net.Listener, storeDirectory string, storeAddress string, maskSize int, startSignal chan<- struct{})

This is seperated so we can run this in the integration test. Tests don't need to export Otel to Honeycomb.

func Start

func Start(ctx context.Context, tileStoreDir string, tileStoreUrl string, maskSize int) (http.Handler, error)

TODO: Evaluate if the context is actually needed

Types

type CacheEntry

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

type FastlyStorage

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

func (*FastlyStorage) AvailableReqs

func (f *FastlyStorage) AvailableReqs() int

func (*FastlyStorage) Get

func (f *FastlyStorage) Get(ctx context.Context, key string) (data []byte, notfounderr bool, err error)

type Fetch

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

type FsStorage

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

func (*FsStorage) AvailableReqs

func (f *FsStorage) AvailableReqs() int

func (*FsStorage) Get

func (f *FsStorage) Get(ctx context.Context, key string) (data []byte, notfounderr bool, err error)

type Storage

type Storage interface {
	Get(ctx context.Context, key string) (data []byte, notfounderr bool, err error)
	AvailableReqs() int
}

type UrlStorage

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

func (*UrlStorage) AvailableReqs

func (f *UrlStorage) AvailableReqs() int

func (*UrlStorage) Get

func (f *UrlStorage) Get(ctx context.Context, key string) (data []byte, notfounderr bool, err error)

Jump to

Keyboard shortcuts

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