local

package
v5.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 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

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

func NewFileSegmentFetcher

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

type FileReader struct {
}

func (*FileReader) ReadFile

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

type FileSegmentFetcher

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

FileSegmentFetcher struct fetches segments from a file

func (*FileSegmentFetcher) Fetch

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

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

func NewFileReader

func NewFileReader() Reader

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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