Documentation
¶
Overview ¶
Package proxy provides a conversation-scoped proxy for Fluxor services.
It implements github.com/viant/fluxor/model/types.Service and routes each method call to a per-conversation instance of the underlying service. The conversation ID is read from context via github.com/viant/agently/genai/conversation.
Usage:
base, _ := newYourService("") // prototype for Name/Methods
svc := proxy.New(base, func(id string) (types.Service, error) {
return newYourService(id) // build per-conversation instance
}, conversation)
// svc can now be registered – method execution is routed by conv ID.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
Proxy is a conversation-aware Service that delegates to per-conversation instances of the underlying service created by Factory.
func (*Proxy) Method ¶
func (p *Proxy) Method(name string) (types.Executable, error)
Method returns an executable that routes the call to the service instance bound to the conversation ID present in ctx. When no conversation ID is present, the base service is used.
func (*Proxy) Methods ¶
func (p *Proxy) Methods() types.Signatures
Methods delegates to the base prototype service.