Documentation ¶
Index ¶
- func NewDryRunClient() (*dryRunClient, error)
- func NewSentryClient(sentryDSN string, environment string, gitCommit string) (*sentryClient, error)
- type CrashTrackerClient
- type CrashTrackerOptions
- type CrashTrackerType
- type MockCrashTrackerClient
- func (m *MockCrashTrackerClient) Clone() CrashTrackerClient
- func (m *MockCrashTrackerClient) FlushEvents(waitTime time.Duration) bool
- func (m *MockCrashTrackerClient) LogAndReportErrors(ctx context.Context, err error, msg string)
- func (m *MockCrashTrackerClient) LogAndReportMessages(ctx context.Context, msg string)
- func (m *MockCrashTrackerClient) Recover()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDryRunClient ¶
func NewDryRunClient() (*dryRunClient, error)
Types ¶
type CrashTrackerClient ¶
type CrashTrackerClient interface { LogAndReportErrors(ctx context.Context, err error, msg string) LogAndReportMessages(ctx context.Context, msg string) FlushEvents(waitTime time.Duration) bool Recover() Clone() CrashTrackerClient }
func GetClient ¶
func GetClient(ctx context.Context, opts CrashTrackerOptions) (CrashTrackerClient, error)
type CrashTrackerOptions ¶
type CrashTrackerOptions struct { CrashTrackerType CrashTrackerType Environment string GitCommit string // Sentry variables SentryDSN string }
type CrashTrackerType ¶
type CrashTrackerType string
const ( // CrashTrackerTypeSentry is used to monitor errors with sentry. CrashTrackerTypeSentry CrashTrackerType = "SENTRY" // CrashTrackerTypeDryRun is used for development environment CrashTrackerTypeDryRun CrashTrackerType = "DRY_RUN" )
func ParseCrashTrackerType ¶
func ParseCrashTrackerType(messengerTypeStr string) (CrashTrackerType, error)
type MockCrashTrackerClient ¶
func NewMockCrashTrackerClient ¶
func NewMockCrashTrackerClient(t testInterface) *MockCrashTrackerClient
NewMockCrashTrackerClient creates a new instance of MockCrashTrackerClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockCrashTrackerClient) Clone ¶
func (m *MockCrashTrackerClient) Clone() CrashTrackerClient
func (*MockCrashTrackerClient) FlushEvents ¶
func (m *MockCrashTrackerClient) FlushEvents(waitTime time.Duration) bool
func (*MockCrashTrackerClient) LogAndReportErrors ¶
func (m *MockCrashTrackerClient) LogAndReportErrors(ctx context.Context, err error, msg string)
func (*MockCrashTrackerClient) LogAndReportMessages ¶
func (m *MockCrashTrackerClient) LogAndReportMessages(ctx context.Context, msg string)
func (*MockCrashTrackerClient) Recover ¶
func (m *MockCrashTrackerClient) Recover()
Click to show internal directories.
Click to hide internal directories.