Skip to content

Conversation

@sugihara1997
Copy link

Elasticsearch への output を追加しました。
環境変数 ELASTICSEARCH_SYNC_ENABLED で、

  • mongo の状態を Elasticsearch に同期する
  • change stream を Elasticsearch に log として保存する
    かを選択できるようにしています。

mxt から es への接続は url への埋め込みによる base 認証を前提としています。

@sugihara1997 sugihara1997 requested a review from syama666 October 10, 2023 06:42
func createChangeStreamIndexSchema(cs primitive.M) (ChangeStreamIndexSchema, error) {
var schema ChangeStreamIndexSchema

idData, err := getMap(cs, "_id")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

この関数群の実装(getStringとかgetMapとか)って全てのinterfacesesにあるんだと思うんだけど(見てないけ)、 もしMongoのバージョンが進んでchangeStreamの型が変わることがあれば、全部変更しないといけない?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

一旦このbranchでテスト進めてOKんだけど、mainブランチにマージされる直前までには直ってると嬉しい

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants