ikvclient

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientOptions

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

type ClientOptionsBuilder

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

func NewClientOptionsBuilder

func NewClientOptionsBuilder() *ClientOptionsBuilder

Create a new options builder.

func (*ClientOptionsBuilder) Build

func (builder *ClientOptionsBuilder) Build() (ClientOptions, error)

func (*ClientOptionsBuilder) WithAccountId

func (builder *ClientOptionsBuilder) WithAccountId(accountId string) *ClientOptionsBuilder

func (*ClientOptionsBuilder) WithAccountPasskey

func (builder *ClientOptionsBuilder) WithAccountPasskey(accountPasskey string) *ClientOptionsBuilder

func (*ClientOptionsBuilder) WithConsoleLogging

func (builder *ClientOptionsBuilder) WithConsoleLogging(level string) *ClientOptionsBuilder

func (*ClientOptionsBuilder) WithFileLogging

func (builder *ClientOptionsBuilder) WithFileLogging(filepath string, level string) *ClientOptionsBuilder

func (*ClientOptionsBuilder) WithKafkaPropertyOverride

func (builder *ClientOptionsBuilder) WithKafkaPropertyOverride(key string, value string) *ClientOptionsBuilder

Ex. withKafkaPropertyOverride("ssl.ca.location", "/etc/ssl/certs") is required on Ubuntu hosts to declare CA certificates.

func (*ClientOptionsBuilder) WithMountDirectory

func (builder *ClientOptionsBuilder) WithMountDirectory(dir string) *ClientOptionsBuilder

func (*ClientOptionsBuilder) WithStoreName

func (builder *ClientOptionsBuilder) WithStoreName(name string) *ClientOptionsBuilder

type DefaultIKVReader

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

func (*DefaultIKVReader) GetBytesValue

func (reader *DefaultIKVReader) GetBytesValue(key interface{}, fieldname string) ([]byte, error)

func (*DefaultIKVReader) GetStringValue

func (reader *DefaultIKVReader) GetStringValue(key interface{}, fieldname string) (string, error)

func (*DefaultIKVReader) Shutdown

func (reader *DefaultIKVReader) Shutdown() error

Shutdown. Reader invokes shutdown sequence on the embedded index via cgo.

func (*DefaultIKVReader) Startup

func (reader *DefaultIKVReader) Startup() error

Startup. Reader fetches and combines server/client configs and opens embedded index via cgo.

type DefaultIKVWriter

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

func NewDefaultIKVWriter

func NewDefaultIKVWriter(clientOptions *ClientOptions) (*DefaultIKVWriter, error)

Constructor for creating new instances.

func (*DefaultIKVWriter) Helloworld

func (writer *DefaultIKVWriter) Helloworld(input string) (*schemas.HelloWorldResponse, error)

func (*DefaultIKVWriter) Shutdown

func (writer *DefaultIKVWriter) Shutdown() error

Shutdown. Teardown connection.

func (*DefaultIKVWriter) Startup

func (writer *DefaultIKVWriter) Startup() error

Startup. Connection initialization.

func (*DefaultIKVWriter) UpsertFields

func (writer *DefaultIKVWriter) UpsertFields(document *IKVDocument) error

Upsert. Publish a document.

type IKVClientFactory

type IKVClientFactory struct {
}

func (*IKVClientFactory) CreateNewReader

func (f *IKVClientFactory) CreateNewReader(clientOptions *ClientOptions) (IKVReader, error)

Create new IKV reader instance.

func (*IKVClientFactory) CreateNewWriter

func (f *IKVClientFactory) CreateNewWriter(clientOptions *ClientOptions) (IKVWriter, error)

Create new IKV writer instance.

type IKVDocument

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

Represents an indexable document for IKV (collection of fields associated with a primary key). See IKVDocumentBuilder to build documents.

type IKVDocumentBuilder

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

func NewIKVDocumentBuilder

func NewIKVDocumentBuilder() *IKVDocumentBuilder

Constructor for a new document builder.

func (*IKVDocumentBuilder) Build

func (builder *IKVDocumentBuilder) Build() (IKVDocument, error)

Build this document.

func (*IKVDocumentBuilder) PutBytesField

func (builder *IKVDocumentBuilder) PutBytesField(fieldname string, value []byte) *IKVDocumentBuilder

Insert a bytes field.

func (*IKVDocumentBuilder) PutStringField

func (builder *IKVDocumentBuilder) PutStringField(fieldname string, value string) *IKVDocumentBuilder

Insert a string field.

type IKVReader

type IKVReader interface {
	Startup() error
	Shutdown() error
	GetBytesValue(key interface{}, fieldname string) ([]byte, error)
	GetStringValue(key interface{}, fieldname string) (string, error)
}

See IKVClientFactory to create a new instance.

type IKVWriter

type IKVWriter interface {
	Startup() error
	Shutdown() error
	UpsertFields(document *IKVDocument) error
}

See IKVClientFactory to create a new instance.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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