mirror of
https://github.com/harness/drone.git
synced 2025-05-06 06:11:28 +08:00
28 lines
683 B
Go
28 lines
683 B
Go
// Copyright 2022 Harness Inc. All rights reserved.
|
|
// Use of this source code is governed by the Polyform Free Trial License
|
|
// that can be found in the LICENSE.md file for this repository.
|
|
|
|
package events
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"github.com/harness/gitness/events"
|
|
)
|
|
|
|
// Reporter is the event reporter for this package.
|
|
type Reporter struct {
|
|
innerReporter *events.GenericReporter
|
|
}
|
|
|
|
func NewReporter(eventsSystem *events.System) (*Reporter, error) {
|
|
innerReporter, err := events.NewReporter(eventsSystem, category)
|
|
if err != nil {
|
|
return nil, errors.New("failed to create new GenericReporter from event system")
|
|
}
|
|
|
|
return &Reporter{
|
|
innerReporter: innerReporter,
|
|
}, nil
|
|
}
|