Documentation
¶
Index ¶
- func ApplyParsedFlags(cfg *config.Config, cmd *cli.Command, state *FlagState, validateListeners bool) error
- func Command() *cli.Command
- func EmbeddedFlags(cfg *config.Config, state *FlagState) []cli.Flag
- func Flags(cfg *config.Config, state *FlagState) []cli.Flag
- func GetTokenResolver(s *Server) *security.TokenResolver
- type FlagState
- type PreparedListener
- type RunningServers
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyParsedFlags ¶
func GetTokenResolver ¶ added in v0.0.3
func GetTokenResolver(s *Server) *security.TokenResolver
GetTokenResolver returns the TokenResolver used by this server, or nil if not yet built. Used by embedded MCP to call ConfigureEmbeddedMCP after BuildServer.
Types ¶
type FlagState ¶
type FlagState struct {
ReadHeaderTimeoutSecs int
CacheLocalMaxBytes string
CacheLocalNumCounters int
CacheLocalBufferItems int
}
func NewFlagState ¶
type PreparedListener ¶
type RunningServers ¶
type RunningServers struct {
Addr net.Addr
Port int
Endpoint string
Network string
HTTPServerPlain *http.Server
HTTPServerTLS *http.Server
GRPCServer *grpc.Server
Close func(ctx context.Context) error
}
func StartSinglePortHTTPAndGRPC ¶
func StartSinglePortHTTPAndGRPC( _ context.Context, cfg config.ListenerConfig, httpHandler http.Handler, grpcServer *grpc.Server, ) (*RunningServers, error)
type Server ¶
type Server struct {
Config *config.Config
Store registrystore.MemoryStore
Router *gin.Engine
GRPCServer *grpc.Server
Running *RunningServers
TokenResolver *security.TokenResolver
// contains filtered or unexported fields
}
Server holds the running server and its subsystems.
func BuildServer ¶
BuildServer initializes all subsystems without binding any network listeners.
func StartServer ¶
StartServer initializes all subsystems and starts HTTP+gRPC on a single port. Use cfg.HTTPPort=0 for a random port. Actual port: Server.Running.Port.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.