admin

package
v25.0.0-split-vector3 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2025 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LazyLoadSchema

func LazyLoadSchema(namespace uint64) error

func NewAddGroupRewriter

func NewAddGroupRewriter() resolve.MutationRewriter

func NewServers

func NewServers(withIntrospection bool, globalEpoch map[uint64]*uint64,
	closer *z.Closer) (IServeGraphQL, IServeGraphQL, *GraphQLHealthStore)

NewServers initializes the GraphQL servers. It sets up an empty server for the main /graphql endpoint and an admin server. The result is mainServer, adminServer.

func NewUpdateGroupRewriter

func NewUpdateGroupRewriter() resolve.MutationRewriter

func SchemaValidate

func SchemaValidate(sch string) error

func WriteErrorResponse

func WriteErrorResponse(w http.ResponseWriter, r *http.Request, err error)

WriteErrorResponse writes the error to the HTTP response writer in GraphQL format.

Types

type DestinationFields

type DestinationFields struct {
	Destination  string
	AccessKey    string
	SecretKey    pb.Sensitive
	SessionToken pb.Sensitive
	Anonymous    bool
}

DestinationFields is used by both export and backup to specify destination

type GraphQLHealth

type GraphQLHealth struct {
	Healthy   bool
	StatusMsg string
}

GraphQLHealth is used to report the health status of a GraphQL server. It is required for kubernetes probing.

type GraphQLHealthStore

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

GraphQLHealthStore stores GraphQLHealth in a thread-safe way.

func (*GraphQLHealthStore) GetHealth

func (g *GraphQLHealthStore) GetHealth() GraphQLHealth

type Headerkey

type Headerkey string

type IServeGraphQL

type IServeGraphQL interface {
	// After Set is called, this IServeGraphQL serves the new resolvers for the given namespace ns.
	Set(ns uint64, schemaEpoch *uint64, resolver *resolve.RequestResolver)

	// HTTPHandler returns a http.Handler that serves GraphQL.
	HTTPHandler() http.Handler

	// ResolveWithNs processes a GQL Request using the correct resolver and returns a GQL Response
	ResolveWithNs(ctx context.Context, ns uint64, gqlReq *schema.Request) *schema.Response
}

An IServeGraphQL can serve a GraphQL endpoint (currently only ons http)

func NewServer

func NewServer() IServeGraphQL

NewServer returns a new IServeGraphQL that can serve the given resolvers

Jump to

Keyboard shortcuts

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