server

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

View Source
const CorsMaxAge = 12 * time.Hour
View Source
const DefaultContentType = "application/json"

Variables

This section is empty.

Functions

This section is empty.

Types

type GRPCIndexServer

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

func NewGRPCIndexServer

func NewGRPCIndexServer(grpcAddress string, certificateFile string, keyFile string, commonName string, indexService proto.IndexServer, logger *zap.Logger) (*GRPCIndexServer, error)

func (*GRPCIndexServer) Start

func (s *GRPCIndexServer) Start() error

func (*GRPCIndexServer) Stop

func (s *GRPCIndexServer) Stop() error

type GRPCIndexService

type GRPCIndexService struct {
	proto.UnimplementedIndexServer
	// contains filtered or unexported fields
}

func NewGRPCIndexService

func NewGRPCIndexService(indexService *IndexService, certificateFile string, commonName string, logger *zap.Logger) (*GRPCIndexService, error)

func (*GRPCIndexService) AddDocuments

func (*GRPCIndexService) Cluster

func (*GRPCIndexService) CreateIndex

func (*GRPCIndexService) DeleteDocuments

func (*GRPCIndexService) DeleteIndex

func (*GRPCIndexService) LivenessCheck

func (*GRPCIndexService) Metrics

func (*GRPCIndexService) ReadinessCheck

func (*GRPCIndexService) Search

type HTTPIndexServer

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

func NewHTTPIndexServerWithTLS

func NewHTTPIndexServerWithTLS(httpAddress string, grpcAddress string, certificateFile string, keyFile string, commonName string, corsAllowedMethods []string, corsAllowedOrigins []string, corsAllowedHeaders []string, logger *zap.Logger) (*HTTPIndexServer, error)

func (*HTTPIndexServer) Start

func (s *HTTPIndexServer) Start() error

func (*HTTPIndexServer) Stop

func (s *HTTPIndexServer) Stop() error

type IndexService

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

func NewIndexService

func NewIndexService(cluster *phalanxcluster.Cluster, metastore *phalanxmetastore.Metastore, certificateFile string, commonName string, logger *zap.Logger) (*IndexService, error)

func (*IndexService) AddDocuments

func (*IndexService) Cluster

func (*IndexService) CreateIndex

func (*IndexService) DeleteDocuments

func (*IndexService) DeleteIndex

func (*IndexService) Search

func (*IndexService) Start

func (s *IndexService) Start() error

func (*IndexService) Stop

func (s *IndexService) Stop() error

type Marshaler added in v0.2.0

type Marshaler struct{}

func NewMarshaler added in v0.2.0

func NewMarshaler() *Marshaler

func (*Marshaler) ContentType added in v0.2.0

func (m *Marshaler) ContentType(v interface{}) string

func (*Marshaler) Delimiter added in v0.2.0

func (m *Marshaler) Delimiter() []byte

func (*Marshaler) Marshal added in v0.2.0

func (m *Marshaler) Marshal(v interface{}) ([]byte, error)

func (*Marshaler) NewDecoder added in v0.2.0

func (m *Marshaler) NewDecoder(r io.Reader) runtime.Decoder

func (*Marshaler) NewEncoder added in v0.2.0

func (m *Marshaler) NewEncoder(w io.Writer) runtime.Encoder

func (*Marshaler) Unmarshal added in v0.2.0

func (m *Marshaler) Unmarshal(data []byte, v interface{}) error

Jump to

Keyboard shortcuts

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