blob: 70a0a74fade116db6ca6b15fe3818df534e181a8 [file] [log] [blame]
Serge Bazanskid7d6e022021-09-01 15:03:06 +02001package rpc
Serge Bazanski9ffa1f92021-09-01 15:42:23 +02002
3import (
Serge Bazanskid7d6e022021-09-01 15:03:06 +02004 cpb "source.monogon.dev/metropolis/node/core/curator/proto/api"
Serge Bazanski9ffa1f92021-09-01 15:42:23 +02005 apb "source.monogon.dev/metropolis/proto/api"
6 epb "source.monogon.dev/metropolis/proto/ext"
7)
8
Serge Bazanski3379a5d2021-09-09 12:56:40 +02009var (
10 // nodePermissions are the set of metropolis.common.ext.authorization
11 // permissions automatically given to nodes when connecting to curator gRPC
12 // services, either locally or remotely.
13 nodePermissions = Permissions{
14 epb.Permission_PERMISSION_READ_CLUSTER_STATUS: true,
15 }
16)
17
18// ClusterExternalServices is the interface containing all gRPC services that a
19// Metropolis Cluster implements on its external interface. With the current
20// implementation of Metropolis, this is all implemented by the Curator.
21type ClusterExternalServices interface {
Serge Bazanskid7d6e022021-09-01 15:03:06 +020022 cpb.CuratorServer
23 apb.AAAServer
24 apb.ManagementServer
Serge Bazanski9ffa1f92021-09-01 15:42:23 +020025}
26
Serge Bazanski3379a5d2021-09-09 12:56:40 +020027// ClusterInternalServices is the interface containing all gRPC services that a
28// Metropolis Cluster implements on its internal interface. Currently this is
29// just the Curator service.
30type ClusterInternalServices interface {
31 cpb.CuratorServer
Serge Bazanskid7d6e022021-09-01 15:03:06 +020032}
33
Serge Bazanski3379a5d2021-09-09 12:56:40 +020034type ClusterServices interface {
35 ClusterExternalServices
36 ClusterInternalServices
Serge Bazanski9ffa1f92021-09-01 15:42:23 +020037}