builtins

package
v0.0.0-...-fe15b9e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuiltinServicesClient

type BuiltinServicesClient struct {
	// contains filtered or unexported fields
}

func NewBuiltinServicesClient

func NewBuiltinServicesClient(hsClient *hostservices.HostServicesClient) *BuiltinServicesClient

func (*BuiltinServicesClient) KVDelete

func (*BuiltinServicesClient) KVGet

func (c *BuiltinServicesClient) KVGet(ctx context.Context, key string) ([]byte, error)

func (*BuiltinServicesClient) KVKeys

func (c *BuiltinServicesClient) KVKeys(ctx context.Context) ([]string, error)

func (*BuiltinServicesClient) KVSet

func (*BuiltinServicesClient) MessagingPublish

func (c *BuiltinServicesClient) MessagingPublish(ctx context.Context, subject string, payload []byte) error

func (*BuiltinServicesClient) MessagingRequest

func (c *BuiltinServicesClient) MessagingRequest(ctx context.Context, subject string, payload []byte) ([]byte, error)

func (*BuiltinServicesClient) ObjectDelete

func (c *BuiltinServicesClient) ObjectDelete(ctx context.Context, objectName string) error

func (*BuiltinServicesClient) ObjectGet

func (c *BuiltinServicesClient) ObjectGet(ctx context.Context, objectName string) ([]byte, error)

func (*BuiltinServicesClient) ObjectList

func (c *BuiltinServicesClient) ObjectList(ctx context.Context) ([]*nats.ObjectInfo, error)

func (*BuiltinServicesClient) ObjectPut

func (c *BuiltinServicesClient) ObjectPut(ctx context.Context, objectName string, payload []byte) (*nats.ObjectInfo, error)

func (*BuiltinServicesClient) RawClient

func (*BuiltinServicesClient) SimpleHttpRequest

func (c *BuiltinServicesClient) SimpleHttpRequest(ctx context.Context, method string, url string, payload []byte) (*agentapi.HostServicesHTTPResponse, error)

type HTTPService

type HTTPService struct {
	// contains filtered or unexported fields
}

func NewHTTPService

func NewHTTPService(log *slog.Logger) (*HTTPService, error)

func (*HTTPService) HandleRequest

func (h *HTTPService) HandleRequest(
	_ *nats.Conn,
	namespace string,
	workloadId string,
	method string,
	workloadName string,
	metadata map[string]string,
	request []byte,
) (hostservices.ServiceResult, error)

func (*HTTPService) Initialize

func (h *HTTPService) Initialize(_ json.RawMessage) error

type KeyValueService

type KeyValueService struct {
	// contains filtered or unexported fields
}

func NewKeyValueService

func NewKeyValueService(log *slog.Logger) (*KeyValueService, error)

func (*KeyValueService) HandleRequest

func (k *KeyValueService) HandleRequest(
	nc *nats.Conn,
	namespace string,
	workloadId string,
	method string,
	workloadName string,
	metadata map[string]string,
	request []byte,
) (hostservices.ServiceResult, error)

func (*KeyValueService) Initialize

func (k *KeyValueService) Initialize(config json.RawMessage) error

type MessagingService

type MessagingService struct {
	// contains filtered or unexported fields
}

func NewMessagingService

func NewMessagingService(log *slog.Logger) (*MessagingService, error)

func (*MessagingService) HandleRequest

func (m *MessagingService) HandleRequest(
	nc *nats.Conn,
	namespace string,
	workloadId string,
	method string,
	workloadName string,
	metadata map[string]string,
	request []byte) (hostservices.ServiceResult, error)

func (*MessagingService) Initialize

func (m *MessagingService) Initialize(config json.RawMessage) error

type ObjectStoreService

type ObjectStoreService struct {
	// contains filtered or unexported fields
}

func NewObjectStoreService

func NewObjectStoreService(log *slog.Logger) (*ObjectStoreService, error)

func (*ObjectStoreService) HandleRequest

func (o *ObjectStoreService) HandleRequest(
	nc *nats.Conn,
	namespace string,
	workloadId string,
	method string,
	workloadName string,
	metadata map[string]string,
	request []byte) (hostservices.ServiceResult, error)

func (*ObjectStoreService) Initialize

func (o *ObjectStoreService) Initialize(config json.RawMessage) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL