Skip to content

Commit

Permalink
Format Proto files
Browse files Browse the repository at this point in the history
  • Loading branch information
torsm committed Aug 30, 2023
1 parent 4f06a72 commit 4c8faeb
Show file tree
Hide file tree
Showing 27 changed files with 164 additions and 166 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ syntax = "proto3";

package fleetspeak.daemonservice;

option go_package = "github.com/google/fleetspeak/fleetspeak/src/client/daemonservice/proto/fleetspeak_daemonservice";

import "google/protobuf/duration.proto";

option go_package = "github.com/google/fleetspeak/fleetspeak/src/client/daemonservice/proto/fleetspeak_daemonservice";

// The configuration information expected by daemonservice.Factory in
// ClientServiceConfig.config.
message Config {
Expand Down Expand Up @@ -51,12 +51,12 @@ message Config {
// message_type="StdOutput"
// data=<fleetspeak.daemonservice.StdOutputData>
message StdParams {
string service_name = 1; // Service on the server to forward to. Required.
string service_name = 1; // Service on the server to forward to. Required.

// A message will be sent when we have flush_bytes queued, or when we
// have bytes flush_time_seconds old.
int32 flush_bytes = 2; // Default and maximum value is 1MB.
int32 flush_time_seconds = 3; // Default is 60.
int32 flush_bytes = 2; // Default and maximum value is 1MB.
int32 flush_time_seconds = 3; // Default is 60.
}
StdParams std_params = 11;
}
4 changes: 2 additions & 2 deletions fleetspeak/src/client/proto/fleetspeak_client/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ syntax = "proto3";

package fleetspeak.client;

option go_package = "github.com/google/fleetspeak/fleetspeak/src/client/proto/fleetspeak_client";

import "google/protobuf/any.proto";

option go_package = "github.com/google/fleetspeak/fleetspeak/src/client/proto/fleetspeak_client";

message ByteBlob {
bytes data = 1;
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ syntax = "proto3";

package fleetspeak.stdinservice;

option go_package = "github.com/google/fleetspeak/fleetspeak/src/client/stdinservice/proto/fleetspeak_stdinservice";

import "google/protobuf/timestamp.proto";
import "fleetspeak/src/common/proto/fleetspeak_monitoring/resource.proto";
import "google/protobuf/timestamp.proto";

option go_package = "github.com/google/fleetspeak/fleetspeak/src/client/stdinservice/proto/fleetspeak_stdinservice";

message InputMessage {
// The data to be forwarded to the service.
Expand Down
5 changes: 3 additions & 2 deletions fleetspeak/src/common/proto/fleetspeak/common.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions fleetspeak/src/common/proto/fleetspeak/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ syntax = "proto3";

package fleetspeak;

option go_package = "github.com/google/fleetspeak/fleetspeak/src/common/proto/fleetspeak";

import "google/protobuf/any.proto";
import "google/protobuf/timestamp.proto";

option go_package = "github.com/google/fleetspeak/fleetspeak/src/common/proto/fleetspeak";

// An Address identifies the source or destination of a message.
message Address {
// The client_id, if the address refers to a service on a client. If unset,
Expand Down Expand Up @@ -69,7 +69,7 @@ message Message {
// The message priority. The primary effect is on the ordering of messages
// sent from the client to the server.
enum Priority {
MEDIUM = 0; // Out of order, but results in a sensible default.
MEDIUM = 0; // Out of order, but results in a sensible default.
LOW = 1;
HIGH = 2;
}
Expand Down Expand Up @@ -131,11 +131,11 @@ message Signature {
// A WrappedContactData is provided by the client to the server with every
// contact.
message WrappedContactData {
bytes contact_data = 1; // A serialized ContactData.
repeated Signature signatures = 2; // Optional extra signatures validating
// contact_data.
repeated string client_labels = 3; // The labels that the client claims to
// have.
bytes contact_data = 1; // A serialized ContactData.
repeated Signature signatures = 2; // Optional extra signatures validating
// contact_data.
repeated string client_labels = 3; // The labels that the client claims to
// have.
}

// On every contact, the client and server exchange ContactData messages.
Expand All @@ -148,7 +148,7 @@ message ContactData {

// Records the client's current time setting, as of the creation of this
// ContactData. Only set by the client.
google.protobuf.Timestamp client_clock = 3;
google.protobuf.Timestamp client_clock = 3;

// If set, acknowledges receipt of a streamed WrappedContactData. This is used
// for control purposes during streaming connections.
Expand All @@ -159,11 +159,11 @@ message ContactData {
bool done_sending = 5;

// Set by the client to indicate how many messages it is willing to accept for
// each installed service. After the first exchange of an streaming connection, it
// represents the number of additional messages that will be accepted.
// each installed service. After the first exchange of an streaming
// connection, it represents the number of additional messages that will be
// accepted.
map<string, uint64> AllowedMessages = 6;
}

// An empty message, typically used as a trivial RPC response.
message EmptyMessage {
}
message EmptyMessage {}
18 changes: 9 additions & 9 deletions fleetspeak/src/common/proto/fleetspeak/system.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions fleetspeak/src/common/proto/fleetspeak/system.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ syntax = "proto3";

package fleetspeak;

option go_package = "github.com/google/fleetspeak/fleetspeak/src/common/proto/fleetspeak";

import "fleetspeak/src/common/proto/fleetspeak/common.proto";
import "google/protobuf/any.proto";
import "google/protobuf/timestamp.proto";
import "fleetspeak/src/common/proto/fleetspeak/common.proto";

option go_package = "github.com/google/fleetspeak/fleetspeak/src/common/proto/fleetspeak";

// A MessageAck message is sent from the client to the server to acknowledge the
// successful receipt of one or more messages. Messages from the server to the
Expand Down Expand Up @@ -77,8 +77,8 @@ message ClientServiceConfig {
// the client. All other labels are only checked on the server.
repeated Label required_labels = 6;

// The time at which the service configuration was signed. Should be populated by
// the signing tool when creating a SignedClientServiceConfig.
// The time at which the service configuration was signed. Should be populated
// by the signing tool when creating a SignedClientServiceConfig.
google.protobuf.Timestamp signed_time = 7;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ syntax = "proto3";

package fleetspeak.monitoring;

option go_package = "github.com/google/fleetspeak/fleetspeak/src/common/proto/fleetspeak_monitoring";

import "google/protobuf/timestamp.proto";

option go_package = "github.com/google/fleetspeak/fleetspeak/src/common/proto/fleetspeak_monitoring";

// Contains resource-usage metrics for Fleetspeak clients. The stats are
// arrived at by aggregating raw data retrieved from the OS.
// CPU-usage is in milliseconds per second, and memory usage is in bytes.
Expand Down
4 changes: 2 additions & 2 deletions fleetspeak/src/config/proto/fleetspeak_config/config.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions fleetspeak/src/config/proto/fleetspeak_config/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ syntax = "proto3";

package fleetspeak.config;

option go_package = "github.com/google/fleetspeak/fleetspeak/src/config/proto/fleetspeak_config";

import "fleetspeak/src/server/components/proto/fleetspeak_components/config.proto";

option go_package = "github.com/google/fleetspeak/fleetspeak/src/config/proto/fleetspeak_config";

// The configuration parameters needed by the configuration tool in order to
// create the artifacts needed to run a fleetspeak installation.
message Config {
Expand All @@ -27,8 +27,8 @@ message Config {
// A file containing the private key associated with trusted_cert_file, only
// required if it is necessary to create server certificates.
//
// NOTE: Contains private key material. Only needs to be online when creating new
// server certificates.
// NOTE: Contains private key material. Only needs to be online when creating
// new server certificates.
string trusted_cert_key_file = 4;

// A file containing a PEM encoded certificate that the Fleetspeak server
Expand Down
10 changes: 6 additions & 4 deletions fleetspeak/src/inttesting/frr/proto/fleetspeak_frr/frr.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 16 additions & 19 deletions fleetspeak/src/inttesting/frr/proto/fleetspeak_frr/frr.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@ syntax = "proto3";

package fleetspeak.frr;

option go_package = "github.com/google/fleetspeak/fleetspeak/src/inttesting/frr/proto/fleetspeak_frr";

import "fleetspeak/src/common/proto/fleetspeak/common.proto";

option go_package = "github.com/google/fleetspeak/fleetspeak/src/inttesting/frr/proto/fleetspeak_frr";

// Contains the information needed to configure a frr server component.
message Config {
// The address to reach the master frr server over grpc.
string master_server = 1;
}

// A TrafficRequest message is sent from the server to the client which tells the
// client to send random data back.
// A TrafficRequest message is sent from the server to the client which tells
// the client to send random data back.
message TrafficRequestData {
// An identifier used to identify the frr master instance responsible for this.
// An identifier used to identify the frr master instance responsible for
// this.
int64 master_id = 1;

// An identifier used to link responses to requests.
Expand Down Expand Up @@ -56,7 +57,6 @@ message FileRequestData {
string name = 2;
}


// A FileResponse is sent from the client to the server and
// reports that the client successfully downloaded a file from the
// server.
Expand Down Expand Up @@ -94,33 +94,30 @@ message CreateHuntRequest {
TrafficRequestData data = 1;
uint64 limit = 2;
// If client_ids is empty, the request is considered a broadcast request with
// specified limit, otherwise unicast requests are sent to the provided clients.
// specified limit, otherwise unicast requests are sent to the provided
// clients.
repeated string client_ids = 3;
}

message CreateHuntResponse {
}
message CreateHuntResponse {}

// The service implemented by the FRR master server to collect data from the FRR
// Fleetspeak server services.
service Master {
// RecordMessage records that a TrafficResponse message was received by
// the FS server.
rpc RecordTrafficResponse(MessageInfo) returns (fleetspeak.EmptyMessage) {
}
rpc RecordTrafficResponse(MessageInfo) returns (fleetspeak.EmptyMessage) {}

// RecordFileResponse records that a FileResponse message was received
// by the FS server.
rpc RecordFileResponse(FileResponseInfo) returns (fleetspeak.EmptyMessage) {
}
rpc RecordFileResponse(FileResponseInfo) returns (fleetspeak.EmptyMessage) {}

// CompletedRequests returns a list of requests made to a client which have been
// completed.
rpc CompletedRequests(CompletedRequestsRequest) returns (CompletedRequestsResponse) {
}
// CompletedRequests returns a list of requests made to a client which have
// been completed.
rpc CompletedRequests(CompletedRequestsRequest)
returns (CompletedRequestsResponse) {}

// CreateHunt initiates a hunt which sends the provided TrafficRequestData to
// every client, up to limit.
rpc CreateHunt(CreateHuntRequest) returns (CreateHuntResponse) {
}
rpc CreateHunt(CreateHuntRequest) returns (CreateHuntResponse) {}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4c8faeb

Please sign in to comment.