Documentation
¶
Overview ¶
Package grpc holds a dependency-free skeleton for an eyrie gRPC API.
eyrie does not currently import google.golang.org/grpc, and per repo policy that dependency is not added speculatively. This file therefore defines only the service contract and a no-op default implementation so the rest of the codebase can reference the gRPC surface today. The real server wiring lives in server_grpc.go behind the "grpc" build tag. See README.md for the design note and codegen steps.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUnimplemented = errUnimplemented{}
ErrUnimplemented is returned by the default ChatService until a real gRPC-backed implementation is provided.
When google.golang.org/grpc and the generated protobuf stubs are added (see README.md), replace noopChatService with an engine-backed adapter and register it via server_grpc.go (build tag "grpc").
Functions ¶
This section is empty.
Types ¶
type ChatRequest ¶
ChatRequest is the unary Chat request payload. It mirrors the HTTP /prompt request fields so a gRPC implementation can reuse the conversation engine without translation.
type ChatResponse ¶
ChatResponse is the unary Chat response payload.
type ChatService ¶
type ChatService interface {
Chat(ctx context.Context, req *ChatRequest) (*ChatResponse, error)
}
ChatService is the eyrie gRPC service contract: a single unary Chat RPC. A concrete implementation will adapt conversation.Engine; see README.md.
func NewChatService ¶
func NewChatService() ChatService
NewChatService returns the default (no-op) ChatService. It exists so callers have a stable constructor; once a real backend exists this will return the engine-backed implementation instead.