Documentation ¶
Index ¶
- func Concurrency(n int) concurrencyOption
- func EphemeralStorage() ephemeralStorageOption
- func GrpcPort(port int) grpcPortOption
- func NatsUrl(url string) natsUrlOption
- func PanicRecovery(enabled bool) panicOption
- func PreventOrphanServiceTasks() orphanTaskOption
- func WithApiAuthorizer(authFn authz.APIFunc) apiAuthorizerOption
- func WithAuthentication(authFn authn.Check) authenticationOption
- func WithNoHealthServer() noHealthServerOption
- func WithSharVersion(version *version2.Version) sharVersionOption
- type Option
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Concurrency ¶ added in v1.0.320
func Concurrency(n int) concurrencyOption
Concurrency specifies the number of threads for each of SHAR's queue listeneres.
func EphemeralStorage ¶ added in v0.1.73
func EphemeralStorage() ephemeralStorageOption
EphemeralStorage instructs SHAR to use memory rather than disk for storage. This is not recommended for production use.
func GrpcPort ¶ added in v1.0.623
func GrpcPort(port int) grpcPortOption
GrpcPort specifies the port healthcheck is listening on
func NatsUrl ¶ added in v1.0.623
func NatsUrl(url string) natsUrlOption
NatsUrl specifies the nats URL to connect to
func PanicRecovery ¶ added in v0.1.171
func PanicRecovery(enabled bool) panicOption
PanicRecovery enables or disables SHAR's ability to recover from server panics. This is on by default, and disabling it is not recommended for production use.
func PreventOrphanServiceTasks ¶ added in v1.0.230
func PreventOrphanServiceTasks() orphanTaskOption
PreventOrphanServiceTasks enables or disables SHAR's validation of service task names againt existing workflows.
func WithApiAuthorizer ¶ added in v1.0.362
WithApiAuthorizer specifies a handler function for API authorization.
func WithAuthentication ¶ added in v1.0.362
WithAuthentication specifies a handler function for API authorization.
func WithNoHealthServer ¶ added in v1.0.427
func WithNoHealthServer() noHealthServerOption
WithNoHealthServer specifies a handler function for API authorization.
func WithSharVersion ¶ added in v1.0.514
WithSharVersion instructs SHAR to claim it is a specific version. This is highly inadvisable as datalos may occur.
Types ¶
type Option ¶ added in v0.1.86
type Option interface {
// contains filtered or unexported methods
}
Option represents a SHAR server option
type Server ¶
type Server struct { SharVersion *version.Version // contains filtered or unexported fields }
Server is the shar server type responsible for hosting the SHAR API.
func (*Server) GetEndPoint ¶ added in v1.0.623
GetEndPoint will return the URL of the GRPC health endpoint for the shar server
func (*Server) Listen ¶
func (s *Server) Listen()
Listen starts the GRPC server for both serving requests, and the GRPC health endpoint.