Skip to content

Commit

Permalink
chore(k8s/log): add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
sarub0b0 committed May 30, 2023
1 parent 2d6e443 commit 53650db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/event/kubernetes/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -827,8 +827,8 @@ impl Worker for FetchLogStream {
let mut line_buffer = None;

// NOTE:
// ログが行区切りで取得できないため、行区切りになるように処理を追加する
// 受信したBytesの最後が改行コードでない場合に、line_bufferに保存し次のループ時に先頭に追加する
// ログが行区切りで取得できないため、行区切りになるように処理する
// 受信したBytesの最後が改行コードでない場合に、中途半端な最終行をline_bufferに保存し次のループ時に先頭に追加する
while let Some(bytes) = logs.try_next().await? {
let logs = String::from_utf8_lossy(&bytes);

Expand Down

0 comments on commit 53650db

Please sign in to comment.