Documentation ¶
Index ¶
- type HostService
- type HostServicesClient
- type HostServicesServer
- func (h *HostServicesServer) AddService(name string, svc HostService, config json.RawMessage) error
- func (h *HostServicesServer) RemoveHostServicesConnection(workloadId string)
- func (h *HostServicesServer) Services() []string
- func (h *HostServicesServer) SetHostServicesConnection(workloadId string, nc *nats.Conn)
- func (h *HostServicesServer) Start() error
- type ServiceResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HostService ¶
type HostServicesClient ¶
type HostServicesClient struct {
// contains filtered or unexported fields
}
func NewHostServicesClient ¶
func NewHostServicesClient(ncInternal *nats.Conn, timeout time.Duration, namespace, workloadName, workloadId string) *HostServicesClient
func (*HostServicesClient) PerformRPC ¶
func (c *HostServicesClient) PerformRPC(ctx context.Context, service string, method string, payload []byte, metadata map[string]string) (ServiceResult, error)
type HostServicesServer ¶
type HostServicesServer struct {
// contains filtered or unexported fields
}
func NewHostServicesServer ¶
func NewHostServicesServer(ncInternal *nats.Conn, log *slog.Logger, tracer trace.Tracer) *HostServicesServer
func (*HostServicesServer) AddService ¶
func (h *HostServicesServer) AddService(name string, svc HostService, config json.RawMessage) error
func (*HostServicesServer) RemoveHostServicesConnection ¶
func (h *HostServicesServer) RemoveHostServicesConnection(workloadId string)
func (*HostServicesServer) Services ¶
func (h *HostServicesServer) Services() []string
func (*HostServicesServer) SetHostServicesConnection ¶
func (h *HostServicesServer) SetHostServicesConnection(workloadId string, nc *nats.Conn)
func (*HostServicesServer) Start ¶
func (h *HostServicesServer) Start() error
Host services server instances subscribe to the following `hostint.>` subjects, which are exported by the `nexnode` account on the configured internal NATS connection for consumption by agents:
- hostint.<agent_id>.rpc.<namespace>.<workloadName>.<service>.<method>
type ServiceResult ¶
func ServiceResultFail ¶
func ServiceResultFail(code uint, message string) ServiceResult
func ServiceResultPass ¶
func ServiceResultPass(code uint, message string, data []byte) ServiceResult
func (ServiceResult) Error ¶
func (r ServiceResult) Error() error
func (ServiceResult) IsError ¶
func (r ServiceResult) IsError() bool
Click to show internal directories.
Click to hide internal directories.