notification

配置

在registry的配置文件中,notification的配置示例如下:

notifications:
    endpoints:
      - name: alistener
        url: https://mylistener.example.com/event
        headers:
          Authorization: [Bearer <your token, if needed>]
        timeout: 500ms
        threshold: 5
        backoff: 1s
  • timeout:向notification发起的请求500ms超时

  • threshold、backoff:请求连续失败5次后,停止1s,再重新发起请求

Events

当registry每pull或push一个layer或manifest的时候,都发产生一个Event。Event是一个json结构体,如下:

Envelope

registry发送给notification server是一个信封,信封中包含一个或多个Event,这些Event不一定有什么关联,信封的json格式如下:

{
   "events" : [ ... ]
}

harbor

harbor中notification server的代码如下:

Last updated