github.com/blend/go-sdk@v1.20220411.3/autoflush/tracer.go (about)

     1  /*
     2  
     3  Copyright (c) 2022 - Present. Blend Labs, Inc. All rights reserved
     4  Use of this source code is governed by a MIT license that can be found in the LICENSE file.
     5  
     6  */
     7  
     8  package autoflush
     9  
    10  import "context"
    11  
    12  // Tracer is a type that can trace actions in the Buffer.
    13  type Tracer interface {
    14  	StartAdd(context.Context) TraceFinisher
    15  	StartAddMany(context.Context) TraceFinisher
    16  	StartQueueFlush(context.Context) TraceFinisher
    17  	StartFlush(context.Context) (context.Context, TraceFinisher)
    18  }
    19  
    20  // TraceFinisher finishes traces.
    21  type TraceFinisher interface {
    22  	Finish(error)
    23  }