Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ace ¶
type Ace struct {
// contains filtered or unexported fields
}
Ace は ace コマンドをラップするクライアント構造体です。 内部で実行コマンドのパスやログ設定、認証用のロックを保持します。
func New ¶
New は ACE のインスタンスを作成します。 WithExecutablePath で ace コマンドの実行パスを指定します。 WithLogger で ace コマンドのログ出力を設定します。
func (*Ace) Invoke ¶
func (ace *Ace) Invoke(ctx context.Context, configPath string, agentName string, input map[string]any, options ...InvokeOption) (*Result, error)
Invoke は ACE を実行して結果を返します。
func (*Ace) SetExecutablePath ¶
SetExecutablePath は ACE インスタンスの実行ファイルパスを設定します。 テストやカスタムビルドを使う場合に利用します。
type AceOption ¶
type AceOption func(*Ace)
AceOption は ACE の設定を変更するためのオプション関数です。 これを使って `New` 呼び出し時に実装固有の設定を注入できます。
func WithExecutablePath ¶
WithExecutablePath は ACE が使用する実行ファイルのパスを設定する オプションを返します。デフォルトは `ace` です。
type InvokeOption ¶
type InvokeOption func(*invokeOptions) error
InvokeOption は Invoke 呼び出しに渡すオプション関数の型です。 各オプションは内部の `invokeOptions` を変更し、エラーを返すことができます。
func WithLogger ¶
func WithLogger(w io.Writer, level string) InvokeOption
WithLogger は ACE のログ出力先とログレベルを設定するオプションを返します。 `w` にログが書き出され、`level` でログの詳細度を制御します。
func WithWorkdir ¶
func WithWorkdir(workdir string) InvokeOption
WithWorkdir は ACE 実行時のカレントディレクトリを指定するオプションを返します。