Documentation ¶
Index ¶
- func Invoke(*Heartbeats)
- func Merge(originalService, mergedService *heartbeatv1.Service)
- func Module() fx.Option
- func PeersWatcherModule() fx.Option
- func RegisterControllerInfoService(grpc *grpc.Server, handler *Heartbeats) error
- func RegisterControllerInfoServiceHTTP() fx.Option
- type ConstructorIn
- type Heartbeats
- type PeersOut
- type ServiceKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Merge ¶ added in v0.2.1
func Merge(originalService, mergedService *heartbeatv1.Service)
Merge merges `mergedService` into `originalService`. This sums `EntitiesCount`.
func PeersWatcherModule ¶
PeersWatcherModule is a fx module that watches all agent peers.
func RegisterControllerInfoService ¶ added in v0.3.0
func RegisterControllerInfoService(grpc *grpc.Server, handler *Heartbeats) error
func RegisterControllerInfoServiceHTTP ¶ added in v0.3.0
Types ¶
type ConstructorIn ¶
type ConstructorIn struct { fx.In Lifecycle fx.Lifecycle Unmarshaller config.Unmarshaller JobGroup *jobs.JobGroup `name:"heartbeats-job-group"` GRPClientConnectionBuilder grpcclient.ClientConnectionBuilder `name:"heartbeats-grpc-client"` HTTPClient *http.Client `name:"heartbeats-http-client"` StatusRegistry status.Registry EntityCache *entitycache.EntityCache `optional:"true"` AgentInfo *agentinfo.AgentInfo `optional:"true"` PeersWatcher *peers.PeerDiscovery `name:"fluxninja-peers-watcher" optional:"true"` EtcdClient *etcdclient.Client PolicyFactory *controlplane.PolicyFactory `optional:"true"` }
ConstructorIn injects dependencies into the Heartbeats constructor.
type Heartbeats ¶
type Heartbeats struct { heartbeatv1.UnimplementedControllerInfoServiceServer ControllerInfo *heartbeatv1.ControllerInfo APIKey string // contains filtered or unexported fields }
func Provide ¶
func Provide(in ConstructorIn) (*Heartbeats, error)
Provide provides a new instance of Heartbeats.
func (*Heartbeats) GetControllerInfo ¶
func (h *Heartbeats) GetControllerInfo(context.Context, *emptypb.Empty) (*heartbeatv1.ControllerInfo, error)
type PeersOut ¶
type PeersOut struct { fx.Out PeerWatcher *peers.PeerDiscovery `name:"fluxninja-peers-watcher" optional:"true"` }
PeersOut is a return struct provided to fx.
type ServiceKey ¶ added in v0.2.1
type ServiceKey struct {
Name string `json:"name"`
}
ServiceKey holds key for service.
Click to show internal directories.
Click to hide internal directories.