proto.go
1package server
2
3import (
4 "github.com/charmbracelet/crush/internal/config"
5 "github.com/charmbracelet/crush/internal/proto"
6)
7
8// ServerProto defines the RPC methods exposed by the Crush server.
9type ServerProto struct {
10 *Server
11}
12
13// GetConfig is an RPC routine that returns the server's configuration.
14func (s *ServerProto) GetConfig(args *proto.Args, reply *config.Config) error {
15 *reply = *s.cfg
16 return nil
17}