All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xyz.block.ftl.v1.module.proto Maven / Gradle / Ivy

There is a newer version: 0.467.0
Show newest version
syntax = "proto3";

package xyz.block.ftl.v1;

import "google/protobuf/duration.proto";
import "xyz/block/ftl/v1/ftl.proto";
import "xyz/block/ftl/v1/schema/schema.proto";

option go_package = "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1;ftlv1";
option java_multiple_files = true;

message AcquireLeaseRequest {
  string module = 1;
  repeated string key = 2;
  google.protobuf.Duration ttl = 3;
}

message AcquireLeaseResponse {}

message PublishEventRequest {
  schema.Ref topic = 1;
  bytes body = 2;
  // Only verb name is included because this verb will be in the same module as topic
  string caller = 3;
}

message PublishEventResponse {}

message ModuleContextRequest {
  string module = 1;
}

message ModuleContextResponse {
  message Ref {
    optional string module = 1;
    string name = 2;
  }

  enum DBType {
    POSTGRES = 0;
  }

  message DSN {
    string name = 1;
    DBType type = 2;
    string dsn = 3;
  }

  string module = 1;
  map configs = 2;
  map secrets = 3;
  repeated DSN databases = 4;
}

// ModuleService is the service that modules use to interact with the Controller.
service ModuleService {
  // Ping service for readiness.
  rpc Ping(PingRequest) returns (PingResponse) {
    option idempotency_level = NO_SIDE_EFFECTS;
  }

  // Get configuration state for the module
  rpc GetModuleContext(ModuleContextRequest) returns (stream ModuleContextResponse);

  // Acquire (and renew) a lease for a deployment.
  //
  // Returns ResourceExhausted if the lease is held.
  rpc AcquireLease(stream AcquireLeaseRequest) returns (stream AcquireLeaseResponse);

  // Publish an event to a topic.
  rpc PublishEvent(PublishEventRequest) returns (PublishEventResponse);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy