Files
certman/app/client/grpc.go
Steven Tracey 0a78b70821
All checks were successful
Build (artifact) / build (push) Successful in 27s
Refactored config system again
2026-06-30 16:48:05 -04:00

27 lines
609 B
Go

package main
import (
"context"
"fmt"
"time"
pb "git.nevets.tech/Steven/certman/proto/v1"
)
// SendHook is currently a no-op pending hook config modeling on ClientDomainConfig.
func SendHook(domain string) {}
func sendHook(client pb.HookServiceClient, hook *pb.Hook) {
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
res, err := client.ExecuteHook(ctx, &pb.ExecuteHookRequest{Hook: hook})
if err != nil {
fmt.Printf("Error executing hook: %v\n", err)
return
}
if res.GetError() != "" {
fmt.Printf("Error executing hook: %s\n", res.GetError())
}
}