//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.
// 

syntax = "proto3";

package satellite.envoy.accesslog.v3;

import "envoy/service/accesslog/v3/als.proto";

option java_package = "org.apache.skywalking.satellite.envoy.accesslog.v3";
option java_outer_classname = "SatelliteAlsProto";
option java_multiple_files = true;
option java_generic_services = true;

// [#protodoc-title: Satellite gRPC Access Log Service (ALS)]

// The new Envoy ALS protocol, work for satellite transmit the ALS message to oap.
service SatelliteAccessLogService {
  // Use the same parameters to transmit access log messages.
  // The only difference is that the identity information (StreamAccessLogsMessage#identity) may occur on each message.
  // Rely on the streaming messages are orderly, so there will be no problems with message processing.
  // Therefore, when the satellite transmits the ALS message, it does not need to open, send and close the stream for each different identity (envoy).
  // As a result, unnecessary streaming operation requests could be reduced, and the satellite becomes more stable when the satellite sends requests to the upstream.
  // Especially when the number of envoys increases, the optimization becomes more obvious.
  rpc StreamAccessLogs(stream .envoy.service.accesslog.v3.StreamAccessLogsMessage) returns (.envoy.service.accesslog.v3.StreamAccessLogsResponse) {
  }
}
