local

package
v4.3.5 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// SplitFileFormatClassic represents the file format of the standard split definition file <feature treatment>
	SplitFileFormatClassic = iota
	// SplitFileFormatJSON represents the file format of a JSON representation of split dtos
	SplitFileFormatJSON
	// SplitFileFormatYAML represents the file format of a YAML representation of split dtos
	SplitFileFormatYAML
)

Variables

This section is empty.

Functions

func DefineFormat added in v4.3.0

func DefineFormat(splitFile string, logger logging.LoggerInterface) int

func NewFileSegmentFetcher added in v4.3.0

func NewFileSegmentFetcher(segmentDirectory string, logger logging.LoggerInterface) service.SegmentFetcher

NewFileSegmentFetcher returns a new instance of LocalFileSegmentFetcher

func NewFileSplitFetcher

func NewFileSplitFetcher(splitFile string, logger logging.LoggerInterface, fileFormat int) service.SplitFetcher

NewFileSplitFetcher returns a new instance of LocalFileSplitFetcher

Types

type FileReader added in v4.3.0

type FileReader struct {
}

func (*FileReader) ReadFile added in v4.3.0

func (f *FileReader) ReadFile(filename string) ([]byte, error)

type FileSegmentFetcher added in v4.3.0

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

FileSegmentFetcher struct fetches segments from a file

func (*FileSegmentFetcher) Fetch added in v4.3.0

func (s *FileSegmentFetcher) Fetch(segmentName string, changeNumber int64, _ *service.FetchOptions) (*dtos.SegmentChangesDTO, error)

Fetch parses the file and returns the appropriate structures

type FileSplitFetcher

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

FileSplitFetcher struct fetches splits from a file

func (*FileSplitFetcher) Fetch

func (s *FileSplitFetcher) Fetch(changeNumber int64, _ *service.FetchOptions) (*dtos.SplitChangesDTO, error)

Fetch parses the file and returns the appropriate structures

type Reader added in v4.3.0

type Reader interface {
	ReadFile(filename string) ([]byte, error)
}

func NewFileReader added in v4.3.0

func NewFileReader() Reader

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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