Kibotos
API 参考kibotos.ctrl.v1

ExposureService

本页列出 kibotos.ctrl.v1 中 ExposureService 的方法及每个方法用到的消息与枚举,由 ctrl.proto 及其注释生成,注释保持英文。多个服务共用的消息与枚举见 kibotos.ctrl.v1 类型。

ctrl API使用 Operator 证书调用。调用方式

ExposureService turns one HTTP port inside a guest into a stable public hostname. The caller never names a provider, tunnel, account, or token: the deployment owns the zone and everything behind it.

CreateExposure

CreateExposure mints a random hostname under the deployment zone and binds it to one exact guest loopback port for the life of the TTL. The hostname is stable across Workspace restarts and is never derived from an identifier, port, or sequence number.

POST/kibotos.ctrl.v1.ExposureService/CreateExposure一元调用
请求CreateExposureRequest
响应CreateExposureResponse

GetExposure

POST/kibotos.ctrl.v1.ExposureService/GetExposure一元调用
请求GetExposureRequest
响应GetExposureResponse

ListExposures

POST/kibotos.ctrl.v1.ExposureService/ListExposures一元调用
请求ListExposuresRequest
  • page_sizeuint32= 1

    Zero selects the server default. Values above the server maximum are rejected rather than silently changed.

  • page_tokenstring= 2

    Opaque cursor returned by the preceding page.

  • workspace_idstring= 3

    Empty lists every Exposure the caller may see; otherwise only this Workspace's, including its revoked ones.

响应ListExposuresResponse

RevokeExposure

RevokeExposure stops serving the hostname and ends the connections running on it. It is idempotent: an already revoked Exposure is returned unchanged.

POST/kibotos.ctrl.v1.ExposureService/RevokeExposure一元调用
请求RevokeExposureRequest
响应RevokeExposureResponse

消息与枚举

ExposureService 的多个方法用到以下消息与枚举。

ExposureSpec

  • Only tcp_loopback is accepted. A unix_stream target is unimplemented: a public HTTP origin addresses a port.

  • ttlgoogle.protobuf.Duration= 2

    Required and positive, bounded by the server maximum. There is no unbounded Exposure: the address is public and unauthenticated.

Exposure

  • exposure_idstring= 1
  • workspace_idstring= 2
  • hostnamestring= 4

    hostname is <label>.<zone>. It is fixed at creation and survives Workspace restarts. It is not reused after revocation.

  • urlstring= 5

    url is derived from hostname. It is returned so a caller never has to assemble a scheme or port of its own. It carries no trailing slash: a caller appends a path to it.

  • created_atgoogle.protobuf.Timestamp= 7
  • expires_atgoogle.protobuf.Timestamp= 8
  • revoked_atgoogle.protobuf.Timestamp= 9

    revoked_at is set exactly when state is REVOKED.

ExposureState

  • EXPOSURE_STATE_UNSPECIFIED= 0
  • EXPOSURE_STATE_ACTIVE= 1
  • EXPOSURE_STATE_REVOKED= 2

本页内容