v1

package
v5.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const MaxBulkItems = 1000

Variables

This section is empty.

Functions

This section is empty.

Types

type AddAssetResponse

type AddAssetResponse struct {
	EntityID string `json:"entityID"`
}

type BulkAddAssetsRequest

type BulkAddAssetsRequest struct {
	Items []json.RawMessage `json:"items"`
}

Bulk typed add: {"items":[ <OAM obj>, <OAM obj>, ... ]} where each item is arbitrary JSON object without "type".

type BulkAddAssetsResponse

type BulkAddAssetsResponse struct {
	Ingested int64 `json:"ingested"`
	Stored   int64 `json:"stored"`
	Failed   int64 `json:"failed"`
}

type Client

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

func NewClient

func NewClient(url string) (*Client, error)

NewClient returns a pointer to a Client struct for the specified server URL.

func (*Client) Close

func (c *Client) Close()

Close terminates any open connections associated with the client.

func (*Client) CreateAsset

func (c *Client) CreateAsset(ctx context.Context, token uuid.UUID, asset oam.Asset) (string, error)

Creates a new asset on the server associated with the provided token.

func (*Client) CreateAssetsBulk

func (c *Client) CreateAssetsBulk(ctx context.Context, token uuid.UUID, atype string, assets []oam.Asset) (int, error)

Creates multiple assets in bulk on the server associated with the provided token.

func (*Client) CreateSession

func (c *Client) CreateSession(ctx context.Context, config *config.Config) (uuid.UUID, error)

Creates a new session on the server with the provided configuration.

func (*Client) HealthCheck

func (c *Client) HealthCheck(ctx context.Context) bool

HealthCheck returns true when the client was able to reach the server.

func (*Client) ListSessions

func (c *Client) ListSessions(ctx context.Context) ([]uuid.UUID, error)

Lists the active session and associated tokens on the server.

func (*Client) SessionScope

func (c *Client) SessionScope(ctx context.Context, token uuid.UUID, atype oam.AssetType) ([]oam.Asset, error)

Retrieves scope for the session associated with the provided token.

func (*Client) SessionStats

func (c *Client) SessionStats(ctx context.Context, token uuid.UUID) (*et.SessionStats, error)

Retrieves statistics for the session associated with the provided token.

func (*Client) Subscribe

func (c *Client) Subscribe(ctx context.Context, token uuid.UUID) (<-chan string, error)

Subscribe to receive a stream of log messages from the server.

func (*Client) TerminateSession

func (c *Client) TerminateSession(ctx context.Context, token uuid.UUID) error

Terminates the session associated with the provided token.

type CreateSessionResponse

type CreateSessionResponse struct {
	SessionToken string `json:"sessionToken"`
}

type ListSessionsResponse

type ListSessionsResponse struct {
	SessionTokens []string `json:"sessionTokens"`
}

Jump to

Keyboard shortcuts

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