Documentation
¶
Index ¶
- Constants
- Variables
- func Chunk(mod ...func(c *chunk.Chunk)) chunk.Chunk
- func Flavor(mod ...func(f *chunk.Flavor)) chunk.Flavor
- func FlavorVersion(t *testing.T, mod ...func(v *chunk.FlavorVersion)) chunk.FlavorVersion
- func Instance(mod ...func(i *instance.Instance)) instance.Instance
- func Node() struct{ ... }
- func PlatformdClientConn(t *testing.T) *grpc.ClientConn
- func RunControlPlane(t *testing.T, pg *Postgres)
- func RunProxyAPIFixtures(ctx context.Context, t *testing.T)
- func RunWorkloadAPIFixtures(t *testing.T)
- func Workload() workloadv1alpha2.Workload
- type FakeCRI
- func (f *FakeCRI) CreateContainer(ctx context.Context, req *runtimev1.CreateContainerRequest) (*runtimev1.CreateContainerResponse, error)
- func (f *FakeCRI) ListImages(ctx context.Context, req *runtimev1.ListImagesRequest) (*runtimev1.ListImagesResponse, error)
- func (f *FakeCRI) ListPodSandbox(ctx context.Context, req *runtimev1.ListPodSandboxRequest) (*runtimev1.ListPodSandboxResponse, error)
- func (f *FakeCRI) PullImage(ctx context.Context, req *runtimev1.PullImageRequest) (*runtimev1.PullImageResponse, error)
- func (f *FakeCRI) RunPodSandbox(ctx context.Context, req *runtimev1.RunPodSandboxRequest) (*runtimev1.RunPodSandboxResponse, error)
- func (f *FakeCRI) StartContainer(ctx context.Context, req *runtimev1.StartContainerRequest) (*runtimev1.StartContainerResponse, error)
- type Postgres
- func (p *Postgres) CreateChunk(t *testing.T, c *chunk.Chunk)
- func (p *Postgres) CreateFlavor(t *testing.T, chunkID string, f *chunk.Flavor)
- func (p *Postgres) CreateInstance(t *testing.T, nodeID string, ins *instance.Instance)
- func (p *Postgres) InsertNode(t *testing.T)
- func (p *Postgres) Run(t *testing.T, ctx context.Context)
Constants ¶
View Source
const ControlPlaneAddr = "localhost:9012"
Variables ¶
View Source
var ( EnvoyAdminAddr = "127.0.0.1:5555" DNSUpstream = netip.MustParseAddrPort("127.0.0.1:53") )
Functions ¶
func FlavorVersion ¶
func FlavorVersion(t *testing.T, mod ...func(v *chunk.FlavorVersion)) chunk.FlavorVersion
func PlatformdClientConn ¶
func PlatformdClientConn(t *testing.T) *grpc.ClientConn
func RunControlPlane ¶
func RunWorkloadAPIFixtures ¶
func Workload ¶
func Workload() workloadv1alpha2.Workload
Types ¶
type FakeCRI ¶
type FakeCRI struct { runtimev1.UnimplementedRuntimeServiceServer runtimev1.UnimplementedImageServiceServer // contains filtered or unexported fields }
func (*FakeCRI) CreateContainer ¶
func (f *FakeCRI) CreateContainer(ctx context.Context, req *runtimev1.CreateContainerRequest, ) (*runtimev1.CreateContainerResponse, error)
func (*FakeCRI) ListImages ¶
func (f *FakeCRI) ListImages(ctx context.Context, req *runtimev1.ListImagesRequest, ) (*runtimev1.ListImagesResponse, error)
func (*FakeCRI) ListPodSandbox ¶
func (f *FakeCRI) ListPodSandbox(ctx context.Context, req *runtimev1.ListPodSandboxRequest, ) (*runtimev1.ListPodSandboxResponse, error)
func (*FakeCRI) PullImage ¶
func (f *FakeCRI) PullImage(ctx context.Context, req *runtimev1.PullImageRequest, ) (*runtimev1.PullImageResponse, error)
func (*FakeCRI) RunPodSandbox ¶
func (f *FakeCRI) RunPodSandbox( ctx context.Context, req *runtimev1.RunPodSandboxRequest, ) (*runtimev1.RunPodSandboxResponse, error)
func (*FakeCRI) StartContainer ¶
func (f *FakeCRI) StartContainer(ctx context.Context, req *runtimev1.StartContainerRequest, ) (*runtimev1.StartContainerResponse, error)
type Postgres ¶
func NewPostgres ¶
func NewPostgres() *Postgres
func (*Postgres) CreateChunk ¶
CreateChunk inserts a chunk and all flavors. it also updates the passed object so that dynamically generated values of fields like id or created_at have the correct value.
func (*Postgres) CreateFlavor ¶
CreateFlavor inserts a flavor. it also updates the passed object so that dynamically generated values of fields like id or created_at have the correct value.
func (*Postgres) CreateInstance ¶
CreateInstance inserts an instance and the chunk as well as all flavors belonging to the chunk. it also updates the passed object so that dynamically generated values of fields like id or created_at have the correct value.
func (*Postgres) InsertNode ¶
Click to show internal directories.
Click to hide internal directories.