Documentation ¶
Index ¶
- Constants
- type Bucket
- type Controller
- func (c *Controller) Listen(ctx context.Context)
- func (c *Controller) SendNotifications(topics map[string]string, p *handler.SendNotificationParams) error
- func (c *Controller) SendTestNotification(topic, bucketName, requestID, HostID string) error
- func (c *Controller) Subscribe(ctx context.Context, topic string, handler layer.MsgHandler) error
- type Event
- type EventRecord
- type Object
- type Options
- type RequestParameters
- type S3Entity
- type Stream
- type TestEvent
- type UserIdentity
Constants ¶
View Source
const ( DefaultTimeout = 30 * time.Second // EventVersion23 is used for lifecycle, tiering, objectACL, objectTagging, object restoration notifications. EventVersion23 = "2.3" // EventVersion22 is used for replication notifications. EventVersion22 = "2.2" // EventVersion21 is used for all other notification types. EventVersion21 = "2.1" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bucket ¶ added in v0.20.0
type Bucket struct { Name string `json:"name"` OwnerIdentity UserIdentity `json:"ownerIdentity,omitempty"` Arn string `json:"arn,omitempty"` }
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(p *Options, l *zap.Logger) (*Controller, error)
func (*Controller) Listen ¶ added in v0.20.0
func (c *Controller) Listen(ctx context.Context)
func (*Controller) SendNotifications ¶ added in v0.20.0
func (c *Controller) SendNotifications(topics map[string]string, p *handler.SendNotificationParams) error
func (*Controller) SendTestNotification ¶ added in v0.20.0
func (c *Controller) SendTestNotification(topic, bucketName, requestID, HostID string) error
func (*Controller) Subscribe ¶ added in v0.20.0
func (c *Controller) Subscribe(ctx context.Context, topic string, handler layer.MsgHandler) error
type Event ¶ added in v0.20.0
type Event struct {
Records []EventRecord `json:"Records"`
}
type EventRecord ¶ added in v0.20.0
type EventRecord struct { EventVersion string `json:"eventVersion"` EventSource string `json:"eventSource"` // neofs:s3 AWSRegion string `json:"awsRegion,omitempty"` // empty EventTime time.Time `json:"eventTime"` EventName string `json:"eventName"` UserIdentity UserIdentity `json:"userIdentity"` RequestParameters RequestParameters `json:"requestParameters"` ResponseElements map[string]string `json:"responseElements"` S3 S3Entity `json:"s3"` }
type RequestParameters ¶ added in v0.20.0
type RequestParameters struct {
SourceIPAddress string `json:"sourceIPAddress"`
}
type UserIdentity ¶ added in v0.20.0
type UserIdentity struct {
PrincipalID string `json:"principalId"`
}
Click to show internal directories.
Click to hide internal directories.