Documentation
¶
Index ¶
- Constants
- func SeedBuiltinNamespaces(ctx context.Context, st store.Store) error
- func SeedBuiltinPolicies(ctx context.Context, st store.Store) error
- type APIServer
- type AuthInfo
- type Option
- func WithAuth(_ []string) Option
- func WithDockerRunner(runner runner.Runner) Option
- func WithExtraGRPCRegistrar(reg func(grpc.ServiceRegistrar)) Option
- func WithGRPCAddr(addr string) Option
- func WithHTTPAddr(addr string) Option
- func WithLogger(logger log.Logger) Option
- func WithNetworkStatusProvider(p service.NetworkStatusProvider) Option
- func WithOrchestrator(orchestrator orchestrator.Orchestrator) Option
- func WithProcessRunner(runner runner.Runner) Option
- func WithStore(store store.Store) Option
- func WithTLS(certFile, keyFile string) Option
- func WithVIPAllocator(a service.VIPAllocator) Option
- type Options
Constants ¶
const ( // AuthorizationHeader is the header key for API key authentication. AuthorizationHeader = "authorization" // APIKeyPrefix is the prefix for API key values in the Authorization header. APIKeyPrefix = "Bearer " )
Variables ¶
This section is empty.
Functions ¶
func SeedBuiltinNamespaces ¶
SeedBuiltinNamespaces ensures the built-in namespaces exist (idempotent).
Types ¶
type APIServer ¶
type APIServer struct {
// contains filtered or unexported fields
}
APIServer represents the gRPC API server for Rune.
func (*APIServer) GetOrchestrator ¶
func (s *APIServer) GetOrchestrator() orchestrator.Orchestrator
GetOrchestrator returns the orchestrator instance. Used by runed to wire post-construction collaborators (e.g. RUNE-063 networking data plane endpoint publisher).
type AuthInfo ¶
type AuthInfo struct {
SubjectID string
}
AuthInfo holds minimal identity used by handlers for RBAC checks
type Option ¶
type Option func(*Options)
Option is a function that configures options.
func WithDockerRunner ¶
WithDockerRunner sets the Docker runner.
func WithExtraGRPCRegistrar ¶
func WithExtraGRPCRegistrar(reg func(grpc.ServiceRegistrar)) Option
WithExtraGRPCRegistrar appends a function that registers an additional gRPC service when the server starts. Callers (e.g. runed wiring up WatchService) use this to inject services without the API server package having to import them.
func WithNetworkStatusProvider ¶
func WithNetworkStatusProvider(p service.NetworkStatusProvider) Option
WithNetworkStatusProvider plugs the live VIP allocator into the AdminService.NetworkStatus RPC.
func WithOrchestrator ¶
func WithOrchestrator(orchestrator orchestrator.Orchestrator) Option
WithOrchestrator sets the orchestrator.
func WithProcessRunner ¶
WithProcessRunner sets the process runner.
func WithVIPAllocator ¶
func WithVIPAllocator(a service.VIPAllocator) Option
WithVIPAllocator plugs the VIP allocator into ServiceService so CreateService assigns a stable VIP from the cluster pool.
type Options ¶
type Options struct {
// Server addresses
GRPCAddr string
HTTPAddr string
// TLS configuration
EnableTLS bool
TLSCertFile string
TLSKeyFile string
// Authentication (token-only)
EnableAuth bool
// Logging
Logger log.Logger
// State store
Store store.Store
// Runner manager
RunnerManager *manager.RunnerManager
// Orchestrator
Orchestrator orchestrator.Orchestrator
// ExtraGRPCRegistrars are invoked during gRPC server startup to
// register additional services beyond the built-in set. Used by
// runed to plug in WatchService (RUNE-028) without forcing the
// API server to depend on every networking-layer package.
ExtraGRPCRegistrars []func(grpc.ServiceRegistrar)
// NetworkStatusProvider, if set, is wired into AdminService so
// the NetworkStatus RPC can report ClusterNetwork CIDR + VIP
// allocations. Supplied by runed alongside the VIP allocator
// (RUNE-040).
NetworkStatusProvider service.NetworkStatusProvider
// VIPAllocator, if set, is plugged into ServiceService so each
// CreateService call assigns a stable VIP from the pool.
// Supplied by runed at startup.
VIPAllocator service.VIPAllocator
}
Options defines the options for the API server.