Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib/events: remove no-op WaitForDelivery method #13217

Merged
merged 4 commits into from
Jun 6, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions lib/auth/auth_with_roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -3809,10 +3809,6 @@ func (a *ServerWithRoles) Close() error {
return a.authServer.Close()
}

func (a *ServerWithRoles) WaitForDelivery(context.Context) error {
return nil
}

// UpsertKubeService creates or updates a Server representing a teleport
// kubernetes service.
func (a *ServerWithRoles) UpsertKubeService(ctx context.Context, s types.Server) error {
Expand Down
4 changes: 0 additions & 4 deletions lib/auth/clt.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,10 +354,6 @@ func (c *Client) Close() error {
return c.APIClient.Close()
}

func (c *Client) WaitForDelivery(context.Context) error {
return nil
}

// CreateCertAuthority not implemented: can only be called locally.
func (c *Client) CreateCertAuthority(ca types.CertAuthority) error {
return trace.NotImplemented(notImplementedMessage)
Expand Down
4 changes: 0 additions & 4 deletions lib/events/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -732,10 +732,6 @@ type IAuditLog interface {
// This function may never return more than 1 MiB of event data.
SearchSessionEvents(fromUTC, toUTC time.Time, limit int, order types.EventOrder, startKey string, cond *types.WhereExpr) ([]apievents.AuditEvent, string, error)

// WaitForDelivery waits for resources to be released and outstanding requests to
// complete after calling Close method
WaitForDelivery(context.Context) error

// StreamSessionEvents streams all events from a given session recording. An error is returned on the first
// channel if one is encountered. Otherwise the event channel is closed when the stream ends.
// The event channel is not closed on error to prevent race conditions in downstream select statements.
Expand Down
4 changes: 0 additions & 4 deletions lib/events/auditlog.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,6 @@ func NewAuditLog(cfg AuditLogConfig) (*AuditLog, error) {
return al, nil
}

func (l *AuditLog) WaitForDelivery(context.Context) error {
return nil
}

func getAuthServers(dataDir string) ([]string, error) {
// scan the log directory:
df, err := os.Open(dataDir)
Expand Down
4 changes: 0 additions & 4 deletions lib/events/discard.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ func NewDiscardAuditLog() *DiscardAuditLog {
return &DiscardAuditLog{}
}

func (d *DiscardAuditLog) WaitForDelivery(context.Context) error {
return nil
}

func (d *DiscardAuditLog) Close() error {
return nil
}
Expand Down
6 changes: 0 additions & 6 deletions lib/events/dynamoevents/dynamoevents.go
Original file line number Diff line number Diff line change
Expand Up @@ -894,12 +894,6 @@ func fromWhereExpr(cond *types.WhereExpr, params *condFilterParams) (string, err
return "", trace.BadParameter("failed to convert WhereExpr %q to DynamoDB filter expression", cond)
}

// WaitForDelivery waits for resources to be released and outstanding requests to
// complete after calling Close method
func (l *Log) WaitForDelivery(ctx context.Context) error {
return nil
}

func (l *Log) turnOnTimeToLive(ctx context.Context) error {
status, err := l.svc.DescribeTimeToLiveWithContext(ctx, &dynamodb.DescribeTimeToLiveInput{
TableName: aws.String(l.Tablename),
Expand Down
4 changes: 0 additions & 4 deletions lib/events/filelog.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,6 @@ func (l *FileLog) Close() error {
return err
}

func (l *FileLog) WaitForDelivery(context.Context) error {
return nil
}

func (l *FileLog) GetSessionChunk(namespace string, sid session.ID, offsetBytes, maxBytes int) ([]byte, error) {
return nil, trace.NotImplemented("not implemented")
}
Expand Down
6 changes: 0 additions & 6 deletions lib/events/firestoreevents/firestoreevents.go
Original file line number Diff line number Diff line change
Expand Up @@ -565,12 +565,6 @@ type searchEventsFilter struct {
condition utils.FieldsCondition
}

// WaitForDelivery waits for resources to be released and outstanding requests to
// complete after calling Close method
func (l *Log) WaitForDelivery(ctx context.Context) error {
return nil
}

func (l *Log) getIndexParent() string {
return "projects/" + l.ProjectID + "/databases/(default)/collectionGroups/" + l.CollectionName
}
Expand Down
6 changes: 0 additions & 6 deletions lib/events/multilog.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ type MultiLog struct {
*MultiEmitter
}

// WaitForDelivery waits for resources to be released and outstanding requests to
// complete after calling Close method
func (m *MultiLog) WaitForDelivery(ctx context.Context) error {
return nil
}

// Close releases connections and resources associated with logs if any
func (m *MultiLog) Close() error {
var errors []error
Expand Down
6 changes: 0 additions & 6 deletions lib/events/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,6 @@ func (w *WriterLog) SearchSessionEvents(fromUTC, toUTC time.Time, limit int, ord
return nil, "", trace.NotImplemented("not implemented")
}

// WaitForDelivery waits for resources to be released and outstanding requests to
// complete after calling Close method
func (w *WriterLog) WaitForDelivery(context.Context) error {
return nil
}

// StreamSessionEvents streams all events from a given session recording. An error is returned on the first
// channel if one is encountered. Otherwise the event channel is closed when the stream ends.
// The event channel is not closed on error to prevent race conditions in downstream select statements.
Expand Down