syntax = "proto3";

package gosdn.plugin_internal;

import "gosdn/plugin-registry/plugin-registry.proto";

option go_package = "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/plugin-internal";

service PluginInternalService {
  rpc AvailablePlugins(GetAvailablePluginsRequest) returns (gosdn.plugin_registry.GetResponse);
  rpc GetPluginSchema(GetPluginSchemaRequest) returns (stream PluginSchemaPayload);
}

message GetAvailablePluginsRequest {
    int64 timestamp = 1;
}

message GetAvailablePluginsResponse {
    int64 timestamp = 1;
    repeated gosdn.plugin_registry.Plugin plugins = 2;
}

message GetPluginSchemaRequest {
    int64 timestamp = 1;
    string pid = 2;
}

message PluginSchemaPayload {
    bytes chunk = 1;
}
