Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ buildscript {
}

group 'io.bokun.inventory'
version '0.4.6'
version '0.4.9'

apply plugin: "com.google.protobuf"
apply plugin: "java"
Expand Down
73 changes: 73 additions & 0 deletions src/main/proto_service/provisioning_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ option java_package = "io.bokun.inventory.service.provisioning.grpc";
service ProvisioningService {
// Returns IS build information
rpc GetBuildInfo (GetBuildInfoRequest) returns (GetBuildInfoResponse) {}

// List plugin/toggle pairs which have toggles open (e.g. disarm availability).
rpc GetMutedPlugins (GetMutedPluginsRequest) returns (GetMutedPluginsResponse) {}

// Forces certain plugin/toggle type to disarm.
rpc MutePlugin(MutePluginRequest) returns (MutePluginResponse) {}

// Forces certain plugin/toggle type to exit disarmed state.
rpc UnmutePlugin (UnmutePluginRequest) returns (UnmutePluginResponse) {}

rpc GetOpenBreakers (GetOpenBreakersRequest) returns (GetOpenBreakersResponse) {}
}

message GetBuildInfoRequest {
Expand All @@ -17,3 +28,65 @@ message GetBuildInfoResponse {
// May contain elements such as branch, build number, etc. Does not imply any particular structure. Mandatory.
string buildInformation = 1;
}

message GetMutedPluginsRequest {
// for which type of functionality results should be retrieved? Mandatory
FunctionType functionType = 1;
}

message GetMutedPluginsResponse {
// a list of type/plugin id pairs which have the functionality muted
repeated FunctionTypePlugin metadata = 1;
}

enum FunctionType {
UNKNOWN = 0;
AVAILABILITY = 1;
}

// wrapper which contains function type & plugin id
message FunctionTypePlugin {
// mandatory
FunctionType type = 1;

// mandatory
string pluginId = 2;
}

message MutePluginRequest {
// a list of breaker type/plugin id pairs which are requested to have them open
repeated FunctionTypePlugin metadata = 1;
}

message MutePluginResponse {
}

message UnmutePluginRequest {
// a list of type/plugin id pairs which are requested to have them closed
repeated FunctionTypePlugin metadata = 1;
}

message UnmutePluginResponse {
}

message GetOpenBreakersRequest {
// for which type of functionality results should be retrieved? Mandatory
FunctionType functionType = 1;
}

// wrapper which contains function type & plugin id & counter
message FunctionTypePluginCount {
// mandatory
FunctionType type = 1;

// mandatory
string pluginId = 2;

// how many nodes have this breaker open? Mandatory
int32 count = 3;
}

message GetOpenBreakersResponse {
// a list of breaker type/plugin id pairs which have the breaker open, plus count (how many nodes have this open)
repeated FunctionTypePluginCount metadata = 1;
}
2 changes: 1 addition & 1 deletion src/main/swagger/inventory_api.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"swagger": "2.0",
"info": {
"description": "Channel Manager REST API. You can find out more about Channel Manager [here](https://www.bokun.io/sell/channel-manager).",
"version": "0.4.6",
"version": "0.4.9",
"title": "Channel Manager REST API",
"contact": {
"email": "support@bokun.io"
Expand Down