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()) } }