new changes

This commit is contained in:
Niranjan
2026-04-07 20:29:49 +05:30
parent 8fe63c7cf4
commit 31fe556bb0
79 changed files with 2917 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
package orchestration
import "yakpanel/control-plane-go/pkg/contracts"
type Queue interface {
Publish(topic string, payload any) error
}
type Dispatcher struct {
queue Queue
}
func NewDispatcher(queue Queue) *Dispatcher {
return &Dispatcher{queue: queue}
}
func (d *Dispatcher) DispatchCommand(cmd contracts.CommandEnvelope) error {
return d.queue.Publish("yakpanel.commands", cmd)
}