sourcemap

package
v6.2.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const MIN_CLEANUP_INTERVAL_SECONDS float64 = 60

Variables

This section is empty.

Functions

func NewElasticsearch

func NewElasticsearch(config *common.Config, index string) (*smapElasticsearch, error)

Types

type Accessor

type Accessor interface {
	Fetch(id Id) (*sourcemap.Consumer, error)
	Remove(id Id)
}

type Config

type Config struct {
	CacheExpiration     time.Duration
	ElasticsearchConfig *common.Config
	Index               string
}

type Enum

type Enum string
const (
	InitError   Enum = "InitError"
	AccessError Enum = "AccessError"
	ParseError  Enum = "ParseError"
	MapError    Enum = "MapError"
	KeyError    Enum = "KeyError"
)

type Error

type Error struct {
	Msg  string
	Kind Enum
}

func (Error) Error

func (e Error) Error() string

type Id

type Id struct {
	ServiceName    string
	ServiceVersion string
	Path           string
}

func (*Id) Key

func (i *Id) Key() string

func (*Id) String

func (i *Id) String() string

func (*Id) Valid

func (i *Id) Valid() bool

type Mapper

type Mapper interface {
	Apply(Id, int, int) (*Mapping, error)
	NewSourcemapAdded(id Id)
}

type Mapping

type Mapping struct {
	Filename string
	Function string
	Colno    int
	Lineno   int
	Path     string
}

type SmapAccessor

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

func NewSmapAccessor

func NewSmapAccessor(config Config) (*SmapAccessor, error)

func (*SmapAccessor) Fetch

func (s *SmapAccessor) Fetch(id Id) (*sourcemap.Consumer, error)

func (*SmapAccessor) Remove

func (s *SmapAccessor) Remove(id Id)

type SmapMapper

type SmapMapper struct {
	Accessor Accessor
}

func NewSmapMapper

func NewSmapMapper(config Config) (*SmapMapper, error)

func (*SmapMapper) Apply

func (m *SmapMapper) Apply(id Id, lineno, colno int) (*Mapping, error)

func (*SmapMapper) NewSourcemapAdded

func (m *SmapMapper) NewSourcemapAdded(id Id)

Jump to

Keyboard shortcuts

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