Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultVisibilityTimeoutS = time.Second * 20
Variables ¶
View Source
var File_schema_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Clock ¶
type Firehose ¶
type Firehose struct { StorageBackend StorageBackend HedwigFirehose *hedwig.Firehose Clock *Clock // contains filtered or unexported fields }
func NewFirehose ¶
func NewFirehose(consumerBackend hedwig.ConsumerBackend, encoderDecoder hedwig.EncoderDecoder, msgList []hedwig.MessageTypeMajorVersion, filePrefixes []string, mtfp MsgToFilePrefix, storageBackend StorageBackend, listenRequest hedwig.ListenRequest, consumerSettings gcp.Settings, processSettings ProcessSettings, logger hedwig.Logger) (*Firehose, error)
func (*Firehose) RunFirehose ¶
RunFirehose starts a Firehose running in leader or follower mode
type LeaderFileExists ¶
type LeaderFileExists struct{}
func (LeaderFileExists) Error ¶
func (e LeaderFileExists) Error() string
type MsgToFilePrefix ¶
MsgToFilePrefix outputs the fileprefix (should be one of fp.fileprefixes) in StagingBucket and OutputBucket for a given hedwig message
type ProcessSettings ¶
type ProcessSettings struct { // interval when leader moves files to final bucket ScrapeInterval int // interval when follower flushes to staging bucket FlushAfter int // bucket where leader file is saved MetadataBucket string // bucket where follower put intermediate files to be moved by leader StagingBucket string // final bucket for firehose files OutputBucket string // timeout before determining if node is a leader panics AcquireRoleTimeout int }
type ReceivedMessage ¶
type ReceivedMessage struct {
// contains filtered or unexported fields
}
type StorageBackend ¶
type StorageBackend interface { // CreateWriter returns a writer for specified uploadlocation CreateWriter(ctx context.Context, uploadBucket string, uploadLocation string) (io.WriteCloser, error) // CreateReader returns a reader for specified uploadlocation CreateReader(ctx context.Context, uploadBucket string, uploadLocation string) (io.ReadCloser, error) // ListFilesPrefix should list all objects with a certain prefix ListFilesPrefix(ctx context.Context, bucket string, prefix string) ([]string, error) // DeleteFile deletes the object at the specified location DeleteFile(ctx context.Context, bucket string, location string) error // GetNodeId returns the id of the node/machine running the firehose process GetNodeId(ctx context.Context) string // GetDeploymentId returns the id of the deployment version of firehose currently running GetDeploymentId(ctx context.Context) string // WriteLeaderFile should return LeaderFileExists error if the leader file already exists fileContents should be json string of leaderFile WriteLeaderFile(ctx context.Context, metadataBucket string, fileContents []byte) error }
StorageBackend is used for interacting with storage
type UserCreatedV1 ¶
type UserCreatedV1 struct { UserId *string `protobuf:"bytes,1,req,name=user_id,json=userId" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*UserCreatedV1) Descriptor
deprecated
func (*UserCreatedV1) Descriptor() ([]byte, []int)
Deprecated: Use UserCreatedV1.ProtoReflect.Descriptor instead.
func (*UserCreatedV1) GetUserId ¶
func (x *UserCreatedV1) GetUserId() string
func (*UserCreatedV1) ProtoMessage ¶
func (*UserCreatedV1) ProtoMessage()
func (*UserCreatedV1) ProtoReflect ¶
func (x *UserCreatedV1) ProtoReflect() protoreflect.Message
func (*UserCreatedV1) Reset ¶
func (x *UserCreatedV1) Reset()
func (*UserCreatedV1) String ¶
func (x *UserCreatedV1) String() string
Click to show internal directories.
Click to hide internal directories.