server

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2019 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

Types

type ComplexityRoot

type ComplexityRoot struct {
	Query struct {
		GetTopics func(childComplexity int) int
	}

	Record struct {
		CreatedAt func(childComplexity int) int
		Key       func(childComplexity int) int
		Offset    func(childComplexity int) int
		Value     func(childComplexity int) int
	}

	Subscription struct {
		RecordAdded func(childComplexity int, topic string, key string) int
	}

	Topic struct {
		Name func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type QueryResolver

type QueryResolver interface {
	GetTopics(ctx context.Context) ([]*models.Topic, error)
}

type ResolverRoot

type ResolverRoot interface {
	Query() QueryResolver
	Subscription() SubscriptionResolver
}

type Run

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

Run runs the kafql server

func NewServer

func NewServer(client *kafka.Service) *Run

NewServer creates a new kafql server

func (*Run) Start

func (r *Run) Start(ctx context.Context, route string, port int) func() error

type SubscriptionResolver

type SubscriptionResolver interface {
	RecordAdded(ctx context.Context, topic string, key string) (<-chan *models.Record, error)
}

Jump to

Keyboard shortcuts

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