Skip to content

Commit

Permalink
Merge pull request #23 from liftbridge-io/update_activity
Browse files Browse the repository at this point in the history
Update activity
  • Loading branch information
tylertreat authored Apr 16, 2020
2 parents 376c660 + 24b0c3f commit 6728b7c
Show file tree
Hide file tree
Showing 4 changed files with 1,250 additions and 493 deletions.
67 changes: 42 additions & 25 deletions api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,48 @@ message Ack {
AckPolicy ackPolicy = 7; // The AckPolicy sent on the message
}

// ActivityStreamOp represents an activity stream operation.
enum ActivityStreamOp {
CREATE_STREAM = 0;
DELETE_STREAM = 1;
PAUSE_STREAM = 2;
RESUME_STREAM = 3;
}

// CreateStreamOp represents a stream creation operation.
message CreateStreamOp {
string stream = 1;
repeated int32 partitions = 2;
}

// DeleteStreamOp represents a stream deletion operation.
message DeleteStreamOp {
string stream = 1;
}

// PauseStreamOp represents a stream pause operation.
message PauseStreamOp {
string stream = 1;
repeated int32 partitions = 2;
bool resumeAll = 3;
}

// ResumeStreamOp represents a stream resume operation.
message ResumeStreamOp {
string stream = 1;
repeated int32 partitions = 2;
}

// ActivityStreamEvent represents an entry into the activity stream.
message ActivityStreamEvent {
uint64 id = 1;
ActivityStreamOp op = 2;
CreateStreamOp createStreamOp = 3;
DeleteStreamOp deleteStreamOp = 4;
PauseStreamOp pauseStreamOp = 5;
ResumeStreamOp resumeStreamOp = 6;
}

// API is the main Liftbridge server interface clients interact with.
service API {
// CreateStream creates a new stream attached to a NATS subject. It returns
Expand Down Expand Up @@ -184,28 +226,3 @@ service API {
// code is returned.
rpc Publish(PublishRequest) returns (PublishResponse) {}
}

// ActivityStreamOp represents an activity stream operation.
enum ActivityStreamOp {
CREATE_PARTITION = 0;
DELETE_STREAM = 1;
}

// CreatePartitionOp represents a partition creation operation.
message CreatePartitionOp {
string stream = 1;
int32 partition = 2;
}

// DeleteStreamOp represents a stream deletion operation.
message DeleteStreamOp {
string stream = 1;
}

// ActivityStreamEvent represents an entry into the activity stream.
message ActivityStreamEvent {
ActivityStreamOp op = 1;
CreatePartitionOp createPartitionOp = 2;
DeleteStreamOp deleteStreamOp = 3;
}

Loading

0 comments on commit 6728b7c

Please sign in to comment.