mock

package
v1.0.0-dev-2 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEventStore

func NewEventStore[T exporter.ExportableEvent]() exporter.EventStore[T]

Types

type Exporter

type Exporter struct {
	ExportedEvents    []exporter.ExportableEvent
	Err               error
	ExpectedNumberErr int
	CurrentNumberErr  int
	Bulk              bool
	// contains filtered or unexported fields
}

func (*Exporter) Export

func (m *Exporter) Export(
	_ context.Context,
	_ *fflog.FFLogger,
	events []exporter.ExportableEvent,
) error

func (*Exporter) GetExportedEvents

func (m *Exporter) GetExportedEvents() []exporter.ExportableEvent

func (*Exporter) IsBulk

func (m *Exporter) IsBulk() bool

type ExporterDeprecated

type ExporterDeprecated struct {
	ExportedEvents    []exporter.FeatureEvent
	Err               error
	ExpectedNumberErr int
	CurrentNumberErr  int
	Bulk              bool
	// contains filtered or unexported fields
}

ExporterDeprecated -----

func (*ExporterDeprecated) Export

func (m *ExporterDeprecated) Export(
	_ context.Context,
	_ *log.Logger,
	events []exporter.FeatureEvent,
) error

func (*ExporterDeprecated) GetExportedEvents

func (m *ExporterDeprecated) GetExportedEvents() []exporter.ExportableEvent

func (*ExporterDeprecated) IsBulk

func (m *ExporterDeprecated) IsBulk() bool

type ExporterDeprecatedV2

type ExporterDeprecatedV2 struct {
	ExportedEvents    []exporter.FeatureEvent
	Err               error
	ExpectedNumberErr int
	CurrentNumberErr  int
	Bulk              bool
	// contains filtered or unexported fields
}

ExporterDeprecatedV2 -----

func (*ExporterDeprecatedV2) Export

func (*ExporterDeprecatedV2) GetExportedEvents

func (m *ExporterDeprecatedV2) GetExportedEvents() []exporter.ExportableEvent

func (*ExporterDeprecatedV2) IsBulk

func (m *ExporterDeprecatedV2) IsBulk() bool

type ExporterMock

type ExporterMock interface {
	exporter.CommonExporter
	GetExportedEvents() []exporter.ExportableEvent
}

type HTTP

type HTTP struct {
	Req           http.Request
	RateLimit     bool
	HasBeenCalled bool
	EndRatelimit  time.Time
}

func (*HTTP) Do

func (m *HTTP) Do(req *http.Request) (*http.Response, error)

type NotificationService

type NotificationService struct {
	NotifyCalls int
	CloseCalled bool
	// contains filtered or unexported fields
}

func (*NotificationService) Close

func (n *NotificationService) Close()

func (*NotificationService) GetNotifyCalls

func (n *NotificationService) GetNotifyCalls() int

func (*NotificationService) Notify

func (n *NotificationService) Notify(_, _ map[string]flag.Flag, _ *fflog.FFLogger)

func (*NotificationService) WasCloseCalled

func (n *NotificationService) WasCloseCalled() bool

type Notifier

type Notifier struct {
	NotifyCalls int
	// contains filtered or unexported fields
}

func (*Notifier) GetNotifyCalls

func (n *Notifier) GetNotifyCalls() int

func (*Notifier) Notify

func (n *Notifier) Notify(_ notifier.DiffCache) error

type TrackingEventExporter

type TrackingEventExporter struct {
	ExportedEvents    []exporter.TrackingEvent
	Err               error
	ExpectedNumberErr int
	CurrentNumberErr  int
	Bulk              bool
	// contains filtered or unexported fields
}

func (*TrackingEventExporter) Export

func (*TrackingEventExporter) GetExportedEvents

func (m *TrackingEventExporter) GetExportedEvents() []exporter.ExportableEvent

func (*TrackingEventExporter) IsBulk

func (m *TrackingEventExporter) IsBulk() bool

Directories

Path Synopsis
Package mockretriever provides mock implementations of various retriever interfaces for testing purposes in the go-feature-flag project.
Package mockretriever provides mock implementations of various retriever interfaces for testing purposes in the go-feature-flag project.

Jump to

Keyboard shortcuts

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